From 00bf881f56819f37898b3b7eb29a28661f0bca88 Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Thu, 6 Feb 2025 18:19:28 +0800 Subject: [PATCH 01/12] refactor: restructure Live2D frontend architecture --- packages/live2d/.gitignore | 13 +++ packages/live2d/README.md | 29 +++++++ packages/live2d/biome.json | 30 +++++++ packages/live2d/index.html | 13 +++ packages/live2d/package.json | 35 ++++++++ packages/live2d/postcss.config.mjs | 5 ++ packages/live2d/src/Demo.tsx | 13 +++ packages/live2d/src/common/UnoLitElement.ts | 4 + .../live2d/src/components/Live2dCanvas.tsx | 22 +++++ packages/live2d/src/components/Live2dTips.tsx | 22 +++++ .../live2d/src/components/Live2dToggle.tsx | 59 ++++++++++++++ .../live2d/src/components/Live2dTools.tsx | 22 +++++ .../live2d/src/components/Live2dWidget.tsx | 23 ++++++ packages/live2d/src/env.d.ts | 1 + packages/live2d/src/events/index.ts | 3 + packages/live2d/src/helpers/sendMessage.ts | 18 +++++ packages/live2d/src/index.ts | 5 ++ packages/live2d/src/live2d/model.ts | 81 +++++++++++++++++++ packages/live2d/src/styles/unocss.global.css | 1 + .../live2d/src/styles/unocss.global.css.d.ts | 2 + packages/live2d/src/types/index.ts | 20 +++++ packages/live2d/src/util/UnoMixin.ts | 20 +++++ packages/live2d/src/util/isString.ts | 7 ++ packages/live2d/tsconfig.json | 31 +++++++ packages/live2d/tsconfig.tsbuildinfo | 1 + packages/live2d/uno.config.ts | 9 +++ packages/live2d/vite.config.ts | 24 ++++++ 27 files changed, 513 insertions(+) create mode 100644 packages/live2d/.gitignore create mode 100644 packages/live2d/README.md create mode 100644 packages/live2d/biome.json create mode 100644 packages/live2d/index.html create mode 100644 packages/live2d/package.json create mode 100644 packages/live2d/postcss.config.mjs create mode 100644 packages/live2d/src/Demo.tsx create mode 100644 packages/live2d/src/common/UnoLitElement.ts create mode 100644 packages/live2d/src/components/Live2dCanvas.tsx create mode 100644 packages/live2d/src/components/Live2dTips.tsx create mode 100644 packages/live2d/src/components/Live2dToggle.tsx create mode 100644 packages/live2d/src/components/Live2dTools.tsx create mode 100644 packages/live2d/src/components/Live2dWidget.tsx create mode 100644 packages/live2d/src/env.d.ts create mode 100644 packages/live2d/src/events/index.ts create mode 100644 packages/live2d/src/helpers/sendMessage.ts create mode 100644 packages/live2d/src/index.ts create mode 100644 packages/live2d/src/live2d/model.ts create mode 100644 packages/live2d/src/styles/unocss.global.css create mode 100644 packages/live2d/src/styles/unocss.global.css.d.ts create mode 100644 packages/live2d/src/types/index.ts create mode 100644 packages/live2d/src/util/UnoMixin.ts create mode 100644 packages/live2d/src/util/isString.ts create mode 100644 packages/live2d/tsconfig.json create mode 100644 packages/live2d/tsconfig.tsbuildinfo create mode 100644 packages/live2d/uno.config.ts create mode 100644 packages/live2d/vite.config.ts diff --git a/packages/live2d/.gitignore b/packages/live2d/.gitignore new file mode 100644 index 0000000..38d7344 --- /dev/null +++ b/packages/live2d/.gitignore @@ -0,0 +1,13 @@ +# Local +.DS_Store +*.local +*.log* + +# Dist +node_modules +dist/ + +# IDE +.vscode/* +!.vscode/extensions.json +.idea diff --git a/packages/live2d/README.md b/packages/live2d/README.md new file mode 100644 index 0000000..37b1dd3 --- /dev/null +++ b/packages/live2d/README.md @@ -0,0 +1,29 @@ +# Rsbuild Project + +## Setup + +Install the dependencies: + +```bash +pnpm install +``` + +## Get Started + +Start the dev server: + +```bash +pnpm dev +``` + +Build the app for production: + +```bash +pnpm build +``` + +Preview the production build locally: + +```bash +pnpm preview +``` diff --git a/packages/live2d/biome.json b/packages/live2d/biome.json new file mode 100644 index 0000000..f281009 --- /dev/null +++ b/packages/live2d/biome.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://biomejs.dev/schemas/1.8.0/schema.json", + "organizeImports": { + "enabled": true + }, + "vcs": { + "enabled": true, + "clientKind": "git", + "useIgnoreFile": true + }, + "formatter": { + "indentStyle": "space" + }, + "javascript": { + "formatter": { + "quoteStyle": "single" + } + }, + "css": { + "parser": { + "cssModules": true + } + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true + } + } +} diff --git a/packages/live2d/index.html b/packages/live2d/index.html new file mode 100644 index 0000000..7f0cf33 --- /dev/null +++ b/packages/live2d/index.html @@ -0,0 +1,13 @@ + + + + + + + Live2d Demo + + +
+ + + diff --git a/packages/live2d/package.json b/packages/live2d/package.json new file mode 100644 index 0000000..731f2a3 --- /dev/null +++ b/packages/live2d/package.json @@ -0,0 +1,35 @@ +{ + "name": "live2d", + "private": true, + "version": "1.0.0", + "type": "module", + "files": ["dist"], + "main": "./dist/live2d.umd.cjs", + "module": "./dist/live2d.js", + "exports": { + ".": { + "import": "./dist/live2d.js", + "require": "./dist/live2d.umd.cjs" + } + }, + "scripts": { + "dev": "vite --open", + "build": "tsc -b && vite build", + "check": "biome check --write" + }, + "dependencies": { + "@lit/react": "^1.0.7", + "lit": "^3.2.1", + "react": "^19.0.0", + "react-dom": "^19.0.0" + }, + "devDependencies": { + "@types/react": "^19.0.0", + "@types/react-dom": "^19.0.0", + "@unocss/postcss": "^65.4.3", + "@vitejs/plugin-react": "^4.3.4", + "ts-lit-plugin": "^2.0.2", + "unocss": "^65.4.3", + "vite": "^6.1.0" + } +} diff --git a/packages/live2d/postcss.config.mjs b/packages/live2d/postcss.config.mjs new file mode 100644 index 0000000..e76c97a --- /dev/null +++ b/packages/live2d/postcss.config.mjs @@ -0,0 +1,5 @@ +import UnoCSS from '@unocss/postcss'; + +export default { + plugins: [UnoCSS()], +}; \ No newline at end of file diff --git a/packages/live2d/src/Demo.tsx b/packages/live2d/src/Demo.tsx new file mode 100644 index 0000000..989f480 --- /dev/null +++ b/packages/live2d/src/Demo.tsx @@ -0,0 +1,13 @@ +import React from 'react'; +import ReactDOM from 'react-dom/client'; +import { Live2dToggleComponent } from './components/Live2dToggle'; + +const rootEl = document.getElementById('root'); +if (rootEl) { + const root = ReactDOM.createRoot(rootEl); + root.render( + + + , + ); +} diff --git a/packages/live2d/src/common/UnoLitElement.ts b/packages/live2d/src/common/UnoLitElement.ts new file mode 100644 index 0000000..bf940fc --- /dev/null +++ b/packages/live2d/src/common/UnoLitElement.ts @@ -0,0 +1,4 @@ +import { LitElement } from "lit"; +import { UNO } from "../util/UnoMixin"; + +export const UnoLitElement = UNO(LitElement) \ No newline at end of file diff --git a/packages/live2d/src/components/Live2dCanvas.tsx b/packages/live2d/src/components/Live2dCanvas.tsx new file mode 100644 index 0000000..8b86854 --- /dev/null +++ b/packages/live2d/src/components/Live2dCanvas.tsx @@ -0,0 +1,22 @@ +import { html, type TemplateResult } from "lit"; +import { UnoLitElement } from "../common/UnoLitElement"; +import { createComponent } from "@lit/react"; +import React from "react"; + +export class Live2dCanvas extends UnoLitElement { + render(): TemplateResult { + return html` +
+ +
+ `; + } +} + +customElements.define("live2d-canvas", Live2dCanvas); + +export const Live2dCanvasComponent = createComponent({ + tagName: "live2d-canvas", + elementClass: Live2dCanvas, + react: React, +}) \ No newline at end of file diff --git a/packages/live2d/src/components/Live2dTips.tsx b/packages/live2d/src/components/Live2dTips.tsx new file mode 100644 index 0000000..6dc8fb2 --- /dev/null +++ b/packages/live2d/src/components/Live2dTips.tsx @@ -0,0 +1,22 @@ +import { html, type TemplateResult } from "lit"; +import { UnoLitElement } from "../common/UnoLitElement"; +import { createComponent } from "@lit/react"; +import React from "react"; + +export class Live2dTips extends UnoLitElement { + render(): TemplateResult { + return html` +
+ +
+ `; + } +} + +customElements.define("live2d-tips", Live2dTips); + +export const Live2dTipsComponent = createComponent({ + tagName: "live2d-tips", + elementClass: Live2dTips, + react: React, +}) \ No newline at end of file diff --git a/packages/live2d/src/components/Live2dToggle.tsx b/packages/live2d/src/components/Live2dToggle.tsx new file mode 100644 index 0000000..f03785e --- /dev/null +++ b/packages/live2d/src/components/Live2dToggle.tsx @@ -0,0 +1,59 @@ +import { html, type TemplateResult } from "lit"; +import { UnoLitElement } from "../common/UnoLitElement"; +import { createComponent } from "@lit/react"; +import React from "react"; +import { TOGGLE_CANVAS_EVENT } from "../events"; +import { state } from "lit/decorators.js"; + +export class Live2dToggle extends UnoLitElement { + @state() + // 当前工具栏是否显示 + private _isShow = false; + + constructor() { + super(); + this.addEventListener("click", this.handleClick); + // 初始化时,判断是否已经隐藏看板娘超过一天,如果是,则显示看板娘。否则,继续隐藏看板娘。 + const live2dDisplay = localStorage.getItem("live2d-display") + if (live2dDisplay) { + if (Date.now() - Number.parseInt(live2dDisplay) > 24 * 60 * 60 * 1000) { + this.triggerToggleLive2d(true); + } + } + } + + render(): TemplateResult { + return html`
+ 看板娘 +
`; + } + + handleClick() { + this.triggerToggleLive2d(!!this._isShow); + } + + triggerToggleLive2d(isShow: boolean) { + // 当前切换栏与 Live2d 的显示状态相反 + this._isShow = !isShow; + if (isShow) { + localStorage.removeItem("live2d-display"); + } else { + localStorage.setItem("live2d-display", Date.now().toString()); + } + this.dispatchEvent(new CustomEvent(TOGGLE_CANVAS_EVENT, { + bubbles: true, + composed: true, + detail: { + isShow, + }, + })); + } +} + +customElements.define("live2d-toggle", Live2dToggle); + +export const Live2dToggleComponent = createComponent({ + tagName: "live2d-toggle", + elementClass: Live2dToggle, + react: React, +}) \ No newline at end of file diff --git a/packages/live2d/src/components/Live2dTools.tsx b/packages/live2d/src/components/Live2dTools.tsx new file mode 100644 index 0000000..7731bb9 --- /dev/null +++ b/packages/live2d/src/components/Live2dTools.tsx @@ -0,0 +1,22 @@ +import { html, type TemplateResult } from "lit"; +import { UnoLitElement } from "../common/UnoLitElement"; +import { createComponent } from "@lit/react"; +import React from "react"; + +export class Live2dTools extends UnoLitElement { + render(): TemplateResult { + return html` +
+ +
+ `; + } +} + +customElements.define("live2d-tools", Live2dTools); + +export const Live2dToolsComponent = createComponent({ + tagName: "live2d-tools", + elementClass: Live2dTools, + react: React, +}) \ No newline at end of file diff --git a/packages/live2d/src/components/Live2dWidget.tsx b/packages/live2d/src/components/Live2dWidget.tsx new file mode 100644 index 0000000..196338c --- /dev/null +++ b/packages/live2d/src/components/Live2dWidget.tsx @@ -0,0 +1,23 @@ +import { html, type TemplateResult } from "lit"; +import { UnoLitElement } from "../common/UnoLitElement"; +import { createComponent } from "@lit/react"; +import React from "react"; +import { state } from "lit/decorators.js"; + +export class Live2dWidget extends UnoLitElement { + render(): TemplateResult { + return html` +
+ +
+ `; + } +} + +customElements.define("live2d-widget", Live2dWidget); + +export const Live2dWidgetComponent = createComponent({ + tagName: "live2d-widget", + elementClass: Live2dWidget, + react: React, +}) \ No newline at end of file diff --git a/packages/live2d/src/env.d.ts b/packages/live2d/src/env.d.ts new file mode 100644 index 0000000..09c0137 --- /dev/null +++ b/packages/live2d/src/env.d.ts @@ -0,0 +1 @@ +/// \ No newline at end of file diff --git a/packages/live2d/src/events/index.ts b/packages/live2d/src/events/index.ts new file mode 100644 index 0000000..89687bf --- /dev/null +++ b/packages/live2d/src/events/index.ts @@ -0,0 +1,3 @@ +export const TOGGLE_CANVAS_EVENT = 'toggle-canvas'; + +export const LIVE2d_MESSAGE_EVENT = 'live2d-message'; \ No newline at end of file diff --git a/packages/live2d/src/helpers/sendMessage.ts b/packages/live2d/src/helpers/sendMessage.ts new file mode 100644 index 0000000..38e8069 --- /dev/null +++ b/packages/live2d/src/helpers/sendMessage.ts @@ -0,0 +1,18 @@ +import { LIVE2d_MESSAGE_EVENT } from "../events"; + +/** + * 向 Live2D 发送消息事件 + * @param text + * @param timeout + * @param priority + */ +export function sendMessage(text: string, timeout = 3000, priority = 0) { + const event = new CustomEvent(LIVE2d_MESSAGE_EVENT, { + detail: { + text, + timeout, + priority, + }, + }); + window.dispatchEvent(event); +} \ No newline at end of file diff --git a/packages/live2d/src/index.ts b/packages/live2d/src/index.ts new file mode 100644 index 0000000..5e2d630 --- /dev/null +++ b/packages/live2d/src/index.ts @@ -0,0 +1,5 @@ +import { Live2dToggle } from "./components/Live2dToggle" + +export { + Live2dToggle +} \ No newline at end of file diff --git a/packages/live2d/src/live2d/model.ts b/packages/live2d/src/live2d/model.ts new file mode 100644 index 0000000..b595e81 --- /dev/null +++ b/packages/live2d/src/live2d/model.ts @@ -0,0 +1,81 @@ +import { sendMessage } from "../helpers/sendMessage"; +import type { Live2dConfig } from "../types"; +import { isNotEmptyString } from "../util/isString"; + +declare const loadlive2d: any; + +interface ModelTexturesResult { + textures: { + id: number; + } +} + +interface ModelResult { + model: { + id: number; + message: string; + } +} + +class Model { + #apiPath: string; + #config: Live2dConfig; + + constructor(config: Live2dConfig) { + const apiPath = config.apiPath; + if (!isNotEmptyString(apiPath)) { + throw new Error("Invalid initWidget argument!"); + } + + this.#apiPath = apiPath.endsWith("/") ? apiPath : `${apiPath}/`; + this.#config = config; + } + + /** + * 为 Live2d 加载模型。 + * + * @param modelId 模型编号 + * @param modelTexturesId 纹理编号 + * @param text 加载时的消息 + */ + async loadModel(modelId: number, modelTexturesId: number, text: string) { + localStorage.setItem("modelId", String(modelId)); + localStorage.setItem("modelTexturesId", String(modelTexturesId)); + // 发送消息事件 + sendMessage(text, 4000, 3); + loadlive2d( + "live2d", + `${this.#apiPath}get/?id=${modelId}-${modelTexturesId}`, + this.#config.consoleShowStatus === true + ? console.log(`[Status] Live2D 模型 ${modelId}-${modelTexturesId} 加载完成`) + : null + ); + } + + /** + * 随机切换模型贴图 + */ + async loadRandTextures() { + const modelId = Number(localStorage.getItem("modelId")); + const modelTexturesId = Number(localStorage.getItem("modelTexturesId")); + // 可选 "rand"(随机), "switch"(顺序) + const result = await fetch(`${this.#apiPath}rand_textures/?id=${modelId}-${modelTexturesId}`) + .then((response) => response.json()) as ModelTexturesResult; + const texturesId = result.textures.id; + if (texturesId === 1 && (modelTexturesId === 1 || modelTexturesId === 0)) { + sendMessage("我还没有其他衣服呢!", 4000, 3); + return; + } + this.loadModel(modelId, texturesId, "我的新衣服好看嘛?"); + } + + /** + * 切换模型 + */ + async loadOtherModel() { + const modelId = Number(localStorage.getItem("modelId")); + const result = await fetch(`${this.#apiPath}switch/?id=${modelId}`) + .then((response) => response.json()) as ModelResult; + this.loadModel(result.model.id, 0, result.model.message); + } +} \ No newline at end of file diff --git a/packages/live2d/src/styles/unocss.global.css b/packages/live2d/src/styles/unocss.global.css new file mode 100644 index 0000000..d76ae77 --- /dev/null +++ b/packages/live2d/src/styles/unocss.global.css @@ -0,0 +1 @@ +@unocss \ No newline at end of file diff --git a/packages/live2d/src/styles/unocss.global.css.d.ts b/packages/live2d/src/styles/unocss.global.css.d.ts new file mode 100644 index 0000000..46fd886 --- /dev/null +++ b/packages/live2d/src/styles/unocss.global.css.d.ts @@ -0,0 +1,2 @@ +declare let style: string +export default style \ No newline at end of file diff --git a/packages/live2d/src/types/index.ts b/packages/live2d/src/types/index.ts new file mode 100644 index 0000000..311ce63 --- /dev/null +++ b/packages/live2d/src/types/index.ts @@ -0,0 +1,20 @@ +export interface Live2dConfig { + // Live2d API 路径 + apiPath: string; + // Live2d 定位 + live2dLocation: "left" | "right"; + // 是否在控制台显示状态 + consoleShowStatus?: boolean; + // 是否显示右侧工具栏 + isTools?: boolean; + [key: string]: unknown; +} + +export interface Live2dMessageEventDetail { + // 消息内容 + text: string; + // 消息显示时间 + timeout: number; + // 消息优先级 + priority: number; +} \ No newline at end of file diff --git a/packages/live2d/src/util/UnoMixin.ts b/packages/live2d/src/util/UnoMixin.ts new file mode 100644 index 0000000..1cbedf7 --- /dev/null +++ b/packages/live2d/src/util/UnoMixin.ts @@ -0,0 +1,20 @@ +import { adoptStyles, type LitElement, unsafeCSS } from 'lit' +// @ts-ignore +import style from "../styles/unocss.global.css?inline" + +declare global { + // biome-ignore lint/suspicious/noExplicitAny: any is needed to define a mixin + export type LitMixin = new (...args: any[]) => T & LitElement; +} + +const stylesheet = unsafeCSS(style) + +export const UNO = (superClass: T): T => + class extends superClass { + connectedCallback() { + super.connectedCallback(); + if (this.shadowRoot) { + adoptStyles(this.shadowRoot, [stylesheet]) + } + } + }; \ No newline at end of file diff --git a/packages/live2d/src/util/isString.ts b/packages/live2d/src/util/isString.ts new file mode 100644 index 0000000..b6f7de8 --- /dev/null +++ b/packages/live2d/src/util/isString.ts @@ -0,0 +1,7 @@ +export const isString = (value: unknown): value is string => { + return typeof value === "string"; +} + +export const isNotEmptyString = (value: unknown): value is string => { + return typeof value === "string" && value.length > 0; +}; \ No newline at end of file diff --git a/packages/live2d/tsconfig.json b/packages/live2d/tsconfig.json new file mode 100644 index 0000000..0b26a03 --- /dev/null +++ b/packages/live2d/tsconfig.json @@ -0,0 +1,31 @@ +{ + "compilerOptions": { + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "jsx": "react-jsx", + "target": "ES2020", + "noEmit": true, + "skipLibCheck": true, + + /* modules */ + "module": "ESNext", + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, + + "experimentalDecorators": true, + "useDefineForClassFields": false, + "plugins": [ + { + "name": "ts-lit-plugin" + } + ] + }, + "include": ["src"] +} diff --git a/packages/live2d/tsconfig.tsbuildinfo b/packages/live2d/tsconfig.tsbuildinfo new file mode 100644 index 0000000..da9ec8e --- /dev/null +++ b/packages/live2d/tsconfig.tsbuildinfo @@ -0,0 +1 @@ +{"root":["./src/demo.tsx","./src/env.d.ts","./src/index.ts","./src/common/unolitelement.ts","./src/components/live2dtoggle.tsx","./src/events/index.ts","./src/styles/unocss.global.css.d.ts","./src/util/unomixin.ts"],"version":"5.7.3"} \ No newline at end of file diff --git a/packages/live2d/uno.config.ts b/packages/live2d/uno.config.ts new file mode 100644 index 0000000..48d1df6 --- /dev/null +++ b/packages/live2d/uno.config.ts @@ -0,0 +1,9 @@ +import { defineConfig, presetUno, transformerDirectives } from 'unocss'; + +export default defineConfig({ + content: { + filesystem: ['src/**/*.{html,ts,js,tsx,jsx}'], + }, + presets: [presetUno()], + transformers: [transformerDirectives()], +}); \ No newline at end of file diff --git a/packages/live2d/vite.config.ts b/packages/live2d/vite.config.ts new file mode 100644 index 0000000..896637b --- /dev/null +++ b/packages/live2d/vite.config.ts @@ -0,0 +1,24 @@ +import { defineConfig } from 'vite' +import { resolve } from 'node:path' +import react from '@vitejs/plugin-react' + +export default defineConfig({ + plugins: [react({ + babel: { + parserOpts: { + plugins: ['decorators-legacy'], + }, + }, + })], + + build: { + lib: { + entry: resolve(__dirname, 'src/index.ts'), + name: 'Live2d', + fileName: 'live2d', + }, + rollupOptions: { + external: ['react', 'react-dom'], + } + } +}) From 439ed34cf4ada89fbe0d8649af9089341316eeca Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Thu, 6 Feb 2025 18:19:46 +0800 Subject: [PATCH 02/12] refactor: restructure Live2D frontend architecture --- .gitignore | 2 + package.json | 25 + pnpm-lock.yaml | 2748 +++++++++++++++++ pnpm-workspace.yaml | 2 + .../run/halo/live2d/Live2dInitProcessor.java | 4 +- 5 files changed, 2779 insertions(+), 2 deletions(-) create mode 100644 package.json create mode 100644 pnpm-lock.yaml create mode 100644 pnpm-workspace.yaml diff --git a/.gitignore b/.gitignore index c97ac56..0ad2ba8 100755 --- a/.gitignore +++ b/.gitignore @@ -72,3 +72,5 @@ application-local.properties /admin-frontend/node_modules/ /workplace/ + +/node_modules/ \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..1065b22 --- /dev/null +++ b/package.json @@ -0,0 +1,25 @@ +{ + "name": "plugin-live2d", + "private": true, + "scripts": { + "build": "pnpm run build:packages", + "example:dev": "pnpm dev --filter ./packages/** " + }, + "author": { + "name": "LIlGG", + "url": "https://github.com/LIlGG" + }, + "contributors": [ + { + "name": "LIlGG", + "email": "mail@e.lixingyong.com", + "url": "https://github.com/LIlGG" + } + ], + "license": "MIT", + "devDependencies": { + "@biomejs/biome": "^1.9.3", + "typescript": "^5.7.2" + }, + "packageManager": "pnpm@9.4.0+sha512.f549b8a52c9d2b8536762f99c0722205efc5af913e77835dbccc3b0b0b2ca9e7dc8022b78062c17291c48e88749c70ce88eb5a74f1fa8c4bf5e18bb46c8bd83a" +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 0000000..7df699b --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,2748 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + devDependencies: + '@biomejs/biome': + specifier: ^1.9.3 + version: 1.9.4 + typescript: + specifier: ^5.7.2 + version: 5.7.3 + + packages/live2d: + dependencies: + '@lit/react': + specifier: ^1.0.7 + version: 1.0.7(@types/react@19.0.8) + lit: + specifier: ^3.2.1 + version: 3.2.1 + react: + specifier: ^19.0.0 + version: 19.0.0 + react-dom: + specifier: ^19.0.0 + version: 19.0.0(react@19.0.0) + devDependencies: + '@types/react': + specifier: ^19.0.0 + version: 19.0.8 + '@types/react-dom': + specifier: ^19.0.0 + version: 19.0.3(@types/react@19.0.8) + '@unocss/postcss': + specifier: ^65.4.3 + version: 65.4.3(postcss@8.5.1) + '@vitejs/plugin-react': + specifier: ^4.3.4 + version: 4.3.4(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2)) + ts-lit-plugin: + specifier: ^2.0.2 + version: 2.0.2 + unocss: + specifier: ^65.4.3 + version: 65.4.3(@unocss/webpack@65.4.3(rollup@4.34.4))(postcss@8.5.1)(rollup@4.34.4)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.7.3)) + vite: + specifier: ^6.1.0 + version: 6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2) + +packages: + + '@ampproject/remapping@2.3.0': + resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} + engines: {node: '>=6.0.0'} + + '@antfu/install-pkg@1.0.0': + resolution: {integrity: sha512-xvX6P/lo1B3ej0OsaErAjqgFYzYVcJpamjLAFLYh9vRJngBrMoUG7aVnrGTeqM7yxbyTD5p3F2+0/QUEh8Vzhw==} + + '@antfu/utils@8.1.0': + resolution: {integrity: sha512-XPR7Jfwp0FFl/dFYPX8ZjpmU4/1mIXTjnZ1ba48BLMyKOV62/tiRjdsFcPs2hsYcSud4tzk7w3a3LjX8Fu3huA==} + + '@babel/code-frame@7.26.2': + resolution: {integrity: sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==} + engines: {node: '>=6.9.0'} + + '@babel/compat-data@7.26.5': + resolution: {integrity: sha512-XvcZi1KWf88RVbF9wn8MN6tYFloU5qX8KjuF3E1PVBmJ9eypXfs4GRiJwLuTZL0iSnJUKn1BFPa5BPZZJyFzPg==} + engines: {node: '>=6.9.0'} + + '@babel/core@7.26.7': + resolution: {integrity: sha512-SRijHmF0PSPgLIBYlWnG0hyeJLwXE2CgpsXaMOrtt2yp9/86ALw6oUlj9KYuZ0JN07T4eBMVIW4li/9S1j2BGA==} + engines: {node: '>=6.9.0'} + + '@babel/generator@7.26.5': + resolution: {integrity: sha512-2caSP6fN9I7HOe6nqhtft7V4g7/V/gfDsC3Ag4W7kEzzvRGKqiv0pu0HogPiZ3KaVSoNDhUws6IJjDjpfmYIXw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-compilation-targets@7.26.5': + resolution: {integrity: sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-imports@7.25.9': + resolution: {integrity: sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-transforms@7.26.0': + resolution: {integrity: sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + + '@babel/helper-plugin-utils@7.26.5': + resolution: {integrity: sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==} + engines: {node: '>=6.9.0'} + + '@babel/helper-string-parser@7.25.9': + resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-identifier@7.25.9': + resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-option@7.25.9': + resolution: {integrity: sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==} + engines: {node: '>=6.9.0'} + + '@babel/helpers@7.26.7': + resolution: {integrity: sha512-8NHiL98vsi0mbPQmYAGWwfcFaOy4j2HY49fXJCfuDcdE7fMIsH9a7GdaeXpIBsbT7307WU8KCMp5pUVDNL4f9A==} + engines: {node: '>=6.9.0'} + + '@babel/parser@7.26.7': + resolution: {integrity: sha512-kEvgGGgEjRUutvdVvZhbn/BxVt+5VSpwXz1j3WYXQbXDo8KzFOPNG2GQbdAiNq8g6wn1yKk7C/qrke03a84V+w==} + engines: {node: '>=6.0.0'} + hasBin: true + + '@babel/plugin-transform-react-jsx-self@7.25.9': + resolution: {integrity: sha512-y8quW6p0WHkEhmErnfe58r7x0A70uKphQm8Sp8cV7tjNQwK56sNVK0M73LK3WuYmsuyrftut4xAkjjgU0twaMg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-react-jsx-source@7.25.9': + resolution: {integrity: sha512-+iqjT8xmXhhYv4/uiYd8FNQsraMFZIfxVSqxxVSZP0WbbSAWvBXAul0m/zu+7Vv4O/3WtApy9pmaTMiumEZgfg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/runtime@7.26.7': + resolution: {integrity: sha512-AOPI3D+a8dXnja+iwsUqGRjr1BbZIe771sXdapOtYI531gSqpi92vXivKcq2asu/DFpdl1ceFAKZyRzK2PCVcQ==} + engines: {node: '>=6.9.0'} + + '@babel/template@7.25.9': + resolution: {integrity: sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==} + engines: {node: '>=6.9.0'} + + '@babel/traverse@7.26.7': + resolution: {integrity: sha512-1x1sgeyRLC3r5fQOM0/xtQKsYjyxmFjaOrLJNtZ81inNjyJHGIolTULPiSc/2qe1/qfpFLisLQYFnnZl7QoedA==} + engines: {node: '>=6.9.0'} + + '@babel/types@7.26.7': + resolution: {integrity: sha512-t8kDRGrKXyp6+tjUh7hw2RLyclsW4TRoRvRHtSyAX9Bb5ldlFh+90YAYY6awRXrlB4G5G2izNeGySpATlFzmOg==} + engines: {node: '>=6.9.0'} + + '@biomejs/biome@1.9.4': + resolution: {integrity: sha512-1rkd7G70+o9KkTn5KLmDYXihGoTaIGO9PIIN2ZB7UJxFrWw04CZHPYiMRjYsaDvVV7hP1dYNRLxSANLaBFGpog==} + engines: {node: '>=14.21.3'} + hasBin: true + + '@biomejs/cli-darwin-arm64@1.9.4': + resolution: {integrity: sha512-bFBsPWrNvkdKrNCYeAp+xo2HecOGPAy9WyNyB/jKnnedgzl4W4Hb9ZMzYNbf8dMCGmUdSavlYHiR01QaYR58cw==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [darwin] + + '@biomejs/cli-darwin-x64@1.9.4': + resolution: {integrity: sha512-ngYBh/+bEedqkSevPVhLP4QfVPCpb+4BBe2p7Xs32dBgs7rh9nY2AIYUL6BgLw1JVXV8GlpKmb/hNiuIxfPfZg==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [darwin] + + '@biomejs/cli-linux-arm64-musl@1.9.4': + resolution: {integrity: sha512-v665Ct9WCRjGa8+kTr0CzApU0+XXtRgwmzIf1SeKSGAv+2scAlW6JR5PMFo6FzqqZ64Po79cKODKf3/AAmECqA==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [linux] + + '@biomejs/cli-linux-arm64@1.9.4': + resolution: {integrity: sha512-fJIW0+LYujdjUgJJuwesP4EjIBl/N/TcOX3IvIHJQNsAqvV2CHIogsmA94BPG6jZATS4Hi+xv4SkBBQSt1N4/g==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [linux] + + '@biomejs/cli-linux-x64-musl@1.9.4': + resolution: {integrity: sha512-gEhi/jSBhZ2m6wjV530Yy8+fNqG8PAinM3oV7CyO+6c3CEh16Eizm21uHVsyVBEB6RIM8JHIl6AGYCv6Q6Q9Tg==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [linux] + + '@biomejs/cli-linux-x64@1.9.4': + resolution: {integrity: sha512-lRCJv/Vi3Vlwmbd6K+oQ0KhLHMAysN8lXoCI7XeHlxaajk06u7G+UsFSO01NAs5iYuWKmVZjmiOzJ0OJmGsMwg==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [linux] + + '@biomejs/cli-win32-arm64@1.9.4': + resolution: {integrity: sha512-tlbhLk+WXZmgwoIKwHIHEBZUwxml7bRJgk0X2sPyNR3S93cdRq6XulAZRQJ17FYGGzWne0fgrXBKpl7l4M87Hg==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [win32] + + '@biomejs/cli-win32-x64@1.9.4': + resolution: {integrity: sha512-8Y5wMhVIPaWe6jw2H+KlEm4wP/f7EW3810ZLmDlrEEy5KvBsb9ECEfu/kMWD484ijfQ8+nIi0giMgu9g1UAuuA==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [win32] + + '@esbuild/aix-ppc64@0.23.1': + resolution: {integrity: sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + + '@esbuild/aix-ppc64@0.24.2': + resolution: {integrity: sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + + '@esbuild/android-arm64@0.23.1': + resolution: {integrity: sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm64@0.24.2': + resolution: {integrity: sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm@0.23.1': + resolution: {integrity: sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + + '@esbuild/android-arm@0.24.2': + resolution: {integrity: sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + + '@esbuild/android-x64@0.23.1': + resolution: {integrity: sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + + '@esbuild/android-x64@0.24.2': + resolution: {integrity: sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + + '@esbuild/darwin-arm64@0.23.1': + resolution: {integrity: sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-arm64@0.24.2': + resolution: {integrity: sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-x64@0.23.1': + resolution: {integrity: sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + + '@esbuild/darwin-x64@0.24.2': + resolution: {integrity: sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + + '@esbuild/freebsd-arm64@0.23.1': + resolution: {integrity: sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-arm64@0.24.2': + resolution: {integrity: sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.23.1': + resolution: {integrity: sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.24.2': + resolution: {integrity: sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + + '@esbuild/linux-arm64@0.23.1': + resolution: {integrity: sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm64@0.24.2': + resolution: {integrity: sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm@0.23.1': + resolution: {integrity: sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-arm@0.24.2': + resolution: {integrity: sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-ia32@0.23.1': + resolution: {integrity: sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-ia32@0.24.2': + resolution: {integrity: sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-loong64@0.23.1': + resolution: {integrity: sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-loong64@0.24.2': + resolution: {integrity: sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-mips64el@0.23.1': + resolution: {integrity: sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-mips64el@0.24.2': + resolution: {integrity: sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-ppc64@0.23.1': + resolution: {integrity: sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-ppc64@0.24.2': + resolution: {integrity: sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-riscv64@0.23.1': + resolution: {integrity: sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-riscv64@0.24.2': + resolution: {integrity: sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-s390x@0.23.1': + resolution: {integrity: sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-s390x@0.24.2': + resolution: {integrity: sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-x64@0.23.1': + resolution: {integrity: sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + + '@esbuild/linux-x64@0.24.2': + resolution: {integrity: sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + + '@esbuild/netbsd-arm64@0.24.2': + resolution: {integrity: sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + + '@esbuild/netbsd-x64@0.23.1': + resolution: {integrity: sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/netbsd-x64@0.24.2': + resolution: {integrity: sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-arm64@0.23.1': + resolution: {integrity: sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + + '@esbuild/openbsd-arm64@0.24.2': + resolution: {integrity: sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.23.1': + resolution: {integrity: sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.24.2': + resolution: {integrity: sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + + '@esbuild/sunos-x64@0.23.1': + resolution: {integrity: sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + + '@esbuild/sunos-x64@0.24.2': + resolution: {integrity: sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + + '@esbuild/win32-arm64@0.23.1': + resolution: {integrity: sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-arm64@0.24.2': + resolution: {integrity: sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-ia32@0.23.1': + resolution: {integrity: sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-ia32@0.24.2': + resolution: {integrity: sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-x64@0.23.1': + resolution: {integrity: sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + + '@esbuild/win32-x64@0.24.2': + resolution: {integrity: sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + + '@iconify/types@2.0.0': + resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==} + + '@iconify/utils@2.3.0': + resolution: {integrity: sha512-GmQ78prtwYW6EtzXRU1rY+KwOKfz32PD7iJh6Iyqw68GiKuoZ2A6pRtzWONz5VQJbp50mEjXh/7NkumtrAgRKA==} + + '@jridgewell/gen-mapping@0.3.8': + resolution: {integrity: sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==} + engines: {node: '>=6.0.0'} + + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + + '@jridgewell/set-array@1.2.1': + resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} + engines: {node: '>=6.0.0'} + + '@jridgewell/source-map@0.3.6': + resolution: {integrity: sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==} + + '@jridgewell/sourcemap-codec@1.5.0': + resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + + '@jridgewell/trace-mapping@0.3.25': + resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} + + '@lit-labs/ssr-dom-shim@1.3.0': + resolution: {integrity: sha512-nQIWonJ6eFAvUUrSlwyHDm/aE8PBDu5kRpL0vHMg6K8fK3Diq1xdPjTnsJSwxABhaZ+5eBi1btQB5ShUTKo4nQ==} + + '@lit/react@1.0.7': + resolution: {integrity: sha512-cencnwwLXQKiKxjfFzSgZRngcWJzUDZi/04E0fSaF86wZgchMdvTyu+lE36DrUfvuus3bH8+xLPrhM1cTjwpzw==} + peerDependencies: + '@types/react': 17 || 18 || 19 + + '@lit/reactive-element@2.0.4': + resolution: {integrity: sha512-GFn91inaUa2oHLak8awSIigYz0cU0Payr1rcFsrkf5OJ5eSPxElyZfKh0f2p9FsTiZWXQdWGJeXZICEfXXYSXQ==} + + '@nodelib/fs.scandir@2.1.5': + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} + + '@nodelib/fs.stat@2.0.5': + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} + + '@nodelib/fs.walk@1.2.8': + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} + + '@polka/url@1.0.0-next.28': + resolution: {integrity: sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==} + + '@rollup/pluginutils@5.1.4': + resolution: {integrity: sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + + '@rollup/rollup-android-arm-eabi@4.34.4': + resolution: {integrity: sha512-gGi5adZWvjtJU7Axs//CWaQbQd/vGy8KGcnEaCWiyCqxWYDxwIlAHFuSe6Guoxtd0SRvSfVTDMPd5H+4KE2kKA==} + cpu: [arm] + os: [android] + + '@rollup/rollup-android-arm64@4.34.4': + resolution: {integrity: sha512-1aRlh1gqtF7vNPMnlf1vJKk72Yshw5zknR/ZAVh7zycRAGF2XBMVDAHmFQz/Zws5k++nux3LOq/Ejj1WrDR6xg==} + cpu: [arm64] + os: [android] + + '@rollup/rollup-darwin-arm64@4.34.4': + resolution: {integrity: sha512-drHl+4qhFj+PV/jrQ78p9ch6A0MfNVZScl/nBps5a7u01aGf/GuBRrHnRegA9bP222CBDfjYbFdjkIJ/FurvSQ==} + cpu: [arm64] + os: [darwin] + + '@rollup/rollup-darwin-x64@4.34.4': + resolution: {integrity: sha512-hQqq/8QALU6t1+fbNmm6dwYsa0PDD4L5r3TpHx9dNl+aSEMnIksHZkSO3AVH+hBMvZhpumIGrTFj8XCOGuIXjw==} + cpu: [x64] + os: [darwin] + + '@rollup/rollup-freebsd-arm64@4.34.4': + resolution: {integrity: sha512-/L0LixBmbefkec1JTeAQJP0ETzGjFtNml2gpQXA8rpLo7Md+iXQzo9kwEgzyat5Q+OG/C//2B9Fx52UxsOXbzw==} + cpu: [arm64] + os: [freebsd] + + '@rollup/rollup-freebsd-x64@4.34.4': + resolution: {integrity: sha512-6Rk3PLRK+b8L/M6m/x6Mfj60LhAUcLJ34oPaxufA+CfqkUrDoUPQYFdRrhqyOvtOKXLJZJwxlOLbQjNYQcRQfw==} + cpu: [x64] + os: [freebsd] + + '@rollup/rollup-linux-arm-gnueabihf@4.34.4': + resolution: {integrity: sha512-kmT3x0IPRuXY/tNoABp2nDvI9EvdiS2JZsd4I9yOcLCCViKsP0gB38mVHOhluzx+SSVnM1KNn9k6osyXZhLoCA==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm-musleabihf@4.34.4': + resolution: {integrity: sha512-3iSA9tx+4PZcJH/Wnwsvx/BY4qHpit/u2YoZoXugWVfc36/4mRkgGEoRbRV7nzNBSCOgbWMeuQ27IQWgJ7tRzw==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm64-gnu@4.34.4': + resolution: {integrity: sha512-7CwSJW+sEhM9sESEk+pEREF2JL0BmyCro8UyTq0Kyh0nu1v0QPNY3yfLPFKChzVoUmaKj8zbdgBxUhBRR+xGxg==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-arm64-musl@4.34.4': + resolution: {integrity: sha512-GZdafB41/4s12j8Ss2izofjeFXRAAM7sHCb+S4JsI9vaONX/zQ8cXd87B9MRU/igGAJkKvmFmJJBeeT9jJ5Cbw==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-loongarch64-gnu@4.34.4': + resolution: {integrity: sha512-uuphLuw1X6ur11675c2twC6YxbzyLSpWggvdawTUamlsoUv81aAXRMPBC1uvQllnBGls0Qt5Siw8reSIBnbdqQ==} + cpu: [loong64] + os: [linux] + + '@rollup/rollup-linux-powerpc64le-gnu@4.34.4': + resolution: {integrity: sha512-KvLEw1os2gSmD6k6QPCQMm2T9P2GYvsMZMRpMz78QpSoEevHbV/KOUbI/46/JRalhtSAYZBYLAnT9YE4i/l4vg==} + cpu: [ppc64] + os: [linux] + + '@rollup/rollup-linux-riscv64-gnu@4.34.4': + resolution: {integrity: sha512-wcpCLHGM9yv+3Dql/CI4zrY2mpQ4WFergD3c9cpRowltEh5I84pRT/EuHZsG0In4eBPPYthXnuR++HrFkeqwkA==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-s390x-gnu@4.34.4': + resolution: {integrity: sha512-nLbfQp2lbJYU8obhRQusXKbuiqm4jSJteLwfjnunDT5ugBKdxqw1X9KWwk8xp1OMC6P5d0WbzxzhWoznuVK6XA==} + cpu: [s390x] + os: [linux] + + '@rollup/rollup-linux-x64-gnu@4.34.4': + resolution: {integrity: sha512-JGejzEfVzqc/XNiCKZj14eb6s5w8DdWlnQ5tWUbs99kkdvfq9btxxVX97AaxiUX7xJTKFA0LwoS0KU8C2faZRg==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-linux-x64-musl@4.34.4': + resolution: {integrity: sha512-/iFIbhzeyZZy49ozAWJ1ZR2KW6ZdYUbQXLT4O5n1cRZRoTpwExnHLjlurDXXPKEGxiAg0ujaR9JDYKljpr2fDg==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-win32-arm64-msvc@4.34.4': + resolution: {integrity: sha512-qORc3UzoD5UUTneiP2Afg5n5Ti1GAW9Gp5vHPxzvAFFA3FBaum9WqGvYXGf+c7beFdOKNos31/41PRMUwh1tpA==} + cpu: [arm64] + os: [win32] + + '@rollup/rollup-win32-ia32-msvc@4.34.4': + resolution: {integrity: sha512-5g7E2PHNK2uvoD5bASBD9aelm44nf1w4I5FEI7MPHLWcCSrR8JragXZWgKPXk5i2FU3JFfa6CGZLw2RrGBHs2Q==} + cpu: [ia32] + os: [win32] + + '@rollup/rollup-win32-x64-msvc@4.34.4': + resolution: {integrity: sha512-p0scwGkR4kZ242xLPBuhSckrJ734frz6v9xZzD+kHVYRAkSUmdSLCIJRfql6H5//aF8Q10K+i7q8DiPfZp0b7A==} + cpu: [x64] + os: [win32] + + '@types/babel__core@7.20.5': + resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} + + '@types/babel__generator@7.6.8': + resolution: {integrity: sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==} + + '@types/babel__template@7.4.4': + resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} + + '@types/babel__traverse@7.20.6': + resolution: {integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==} + + '@types/estree@1.0.6': + resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} + + '@types/node@22.13.1': + resolution: {integrity: sha512-jK8uzQlrvXqEU91UxiK5J7pKHyzgnI1Qnl0QDHIgVGuolJhRb9EEl28Cj9b3rGR8B2lhFCtvIm5os8lFnO/1Ew==} + + '@types/react-dom@19.0.3': + resolution: {integrity: sha512-0Knk+HJiMP/qOZgMyNFamlIjw9OFCsyC2ZbigmEEyXXixgre6IQpm/4V+r3qH4GC1JPvRJKInw+on2rV6YZLeA==} + peerDependencies: + '@types/react': ^19.0.0 + + '@types/react@19.0.8': + resolution: {integrity: sha512-9P/o1IGdfmQxrujGbIMDyYaaCykhLKc0NGCtYcECNUr9UAaDe4gwvV9bR6tvd5Br1SG0j+PBpbKr2UYY8CwqSw==} + + '@types/trusted-types@2.0.7': + resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==} + + '@unocss/astro@65.4.3': + resolution: {integrity: sha512-yhPKH4CT2CFjvKR8lL6oS/7jarMWp4iSnYcNlTlZLmvTIS3dGxyhAsVy/xkdzdJ6sM+6FS0hUuQNv+NYvArRNg==} + peerDependencies: + vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0 + peerDependenciesMeta: + vite: + optional: true + + '@unocss/cli@65.4.3': + resolution: {integrity: sha512-pZESqf5tS5AjATkAP11M0ecIiias0//nir7MgUQLs/v2GX0x7K0KhVTJ50TiFePff0TnwTHheDNJGR3gesDiVg==} + engines: {node: '>=14'} + hasBin: true + + '@unocss/config@65.4.3': + resolution: {integrity: sha512-Z3tnQ10UjM09Y1yVqfCYfZEh2pXFQlUQ1g188mMWxjXWEIXeei3f9dIApRBgC+xcPE6prqdu3fDC5emU+sqyxw==} + engines: {node: '>=14'} + + '@unocss/core@65.4.3': + resolution: {integrity: sha512-luFgdcchSlNrYSaDvU2176T2PPQZdxqfREVbxEXNXlFEgyEFrx5hOSUXoJtJSZjRhAcE6zkWyLDf/JkQJ5Eeyw==} + + '@unocss/extractor-arbitrary-variants@65.4.3': + resolution: {integrity: sha512-RhSOOzOxkNjJl9zeglaBe0U+o39jleCCNPWJ87DDJA3ckbyylIIf21ZwY1Xu76rmdar5DT9ob7ucuPfEpJLN9A==} + + '@unocss/inspector@65.4.3': + resolution: {integrity: sha512-mj3K0WtnP0DuonQPzxkXhLMBU5qi13dpxaJcEOSv+EBMPlJbww0bj7K7uaFqXv8LPufs/hkQzI9yjOrEzR5WBQ==} + + '@unocss/postcss@65.4.3': + resolution: {integrity: sha512-ZHlWfArfhhWBVhUeAETrtnD7nhqpfXv5muGrJCSDHmjgFJX8jtDa6rf52ICCFWEOe8p2dku7o27o26pGXYTYJg==} + engines: {node: '>=14'} + peerDependencies: + postcss: ^8.4.21 + + '@unocss/preset-attributify@65.4.3': + resolution: {integrity: sha512-kN8levkt+BwzzWKA6glthasuFt/Cplc70oxzAYd/gZcosxwDK5+MmxjGDG5aLLu2PA58tPHUZ+ltW/QG5BM+Xw==} + + '@unocss/preset-icons@65.4.3': + resolution: {integrity: sha512-g1WNamvYOIdD8YAOvZ5h4g3peel3rLTtKvB0wX4pVL5exsYsoyc0tmiGm57k+ZmnIucqSzxoUZ/vjHDLAViahw==} + + '@unocss/preset-mini@65.4.3': + resolution: {integrity: sha512-JajAF18DKJRXgd9usrAYTcHUtZy606mD396ZswDgw/mUSu529tuiT6LOD43aJMYHgPEw7wKYjiGFHkeBTHijuQ==} + + '@unocss/preset-tagify@65.4.3': + resolution: {integrity: sha512-8/MbMbgdvj1A87XNVVzD8gFVqywaSJAD3Bv8RwjcFn0rwlgZY0PdTBYo3M3FH25axb4znzXBmLZdEBVZOGUosg==} + + '@unocss/preset-typography@65.4.3': + resolution: {integrity: sha512-DEo7GECG0AQ8FkzH/x8QCEL5BR1D+GNoxHGmNxc7rFKghJONVyJ3jROA9mDmWNAva8JygN4Up+lzPZG3mNYezQ==} + + '@unocss/preset-uno@65.4.3': + resolution: {integrity: sha512-gxELOQwR3YbMLR+WjYz3m/Zb6VXa8O0Xln0rfS2TI7OXXoQ1twak5zwYPrOI5fJF8lJ5yyKUiXiOR8UEPBpoCQ==} + + '@unocss/preset-web-fonts@65.4.3': + resolution: {integrity: sha512-edkyohQ4+qjuOxIJf+NeQiEayB47A9eA2NhBLbcqZ0OfMpN8tRZPVW5cyB3b5Ef253NGMd4S8H/96vGTBpqOBA==} + + '@unocss/preset-wind@65.4.3': + resolution: {integrity: sha512-KM13xIARNeZ/ZKJr33fZ89l79wgI+1Oo8VPJzmckLjbH9IGOhcH2GON7wVIxQqqqM9IM3vALEqw2KNdM6ontWw==} + + '@unocss/reset@65.4.3': + resolution: {integrity: sha512-f9QnMtY1yPS1HEIkeKmSwUYcp4QS6zdo9ZcIFE9PDSLOcns3v+M1lTQg8mLChxJHVl73Cf6PofWVh5tmnxV53Q==} + + '@unocss/rule-utils@65.4.3': + resolution: {integrity: sha512-bzRRdb9mb82IvgOt3KiRyUh/njRfJC3hoV84lMyUPryT8YTEP/hl6kt2KQ2l1K3WDz7ZPQXVi2eqUbqc+AUpwg==} + engines: {node: '>=14'} + + '@unocss/transformer-attributify-jsx@65.4.3': + resolution: {integrity: sha512-GI0joW6+jG3sLMzqDxT/Nr0lGarHKsXQzpKQt1LfBGEDgNSQZtDZ1IGlkdZeErRFvWcDLWU0xm2LikLS4Az8kw==} + + '@unocss/transformer-compile-class@65.4.3': + resolution: {integrity: sha512-AzLeic0ESQ/yhLKfkSsQ72wQLkKEPsmX578+ZKcPSRh/HM5tfNz8RqffOHr6YOEKKTaZHN23OqbA511amRKC1w==} + + '@unocss/transformer-directives@65.4.3': + resolution: {integrity: sha512-e3zZYjXqHSWb6YrC09/FnCsndhZdRzmYhPubTzOjnvb5K0ihIiLvHx9c2TRPWvMspXs0wHKQsLW5fAs8oyimeQ==} + + '@unocss/transformer-variant-group@65.4.3': + resolution: {integrity: sha512-nZNgKLclhIjfuqCaZTmJwhWSByL7vnhb3l/ChRX4qtWOweRLro79r6MvfcqQNrweK5nCw4yibsXCrFUWq7Jj5w==} + + '@unocss/vite@65.4.3': + resolution: {integrity: sha512-YajF8Z2J/KvXdnC5BsGJjt3fm4D14vmYaHdlTyzi92Rkh/67JtaCz2OhElDoF6k4S4fm9B8uLRP10p+smRe9Fw==} + peerDependencies: + vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0 + + '@unocss/webpack@65.4.3': + resolution: {integrity: sha512-jD2vmKSenoJNjt8upRI3S4OvucamicuJ0GuPnNDPl1kFGtdZb9dJX0cNABCx00xORZg/4rP52/xeDHVCCU97HA==} + peerDependencies: + webpack: ^4 || ^5 + + '@vitejs/plugin-react@4.3.4': + resolution: {integrity: sha512-SCCPBJtYLdE8PX/7ZQAs1QAZ8Jqwih+0VBLum1EGqmCCQal+MIUqLCzj3ZUy8ufbC0cAM4LRlSTm7IQJwWT4ug==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + vite: ^4.2.0 || ^5.0.0 || ^6.0.0 + + '@vscode/web-custom-data@0.4.13': + resolution: {integrity: sha512-2ZUIRfhofZ/npLlf872EBnPmn27Kt4M2UssmQIfnJvgGgMYZJ5fvtHEDnttBBf2hnVtBgNCqZMVHJA+wsFVqTA==} + + '@vue/compiler-core@3.5.13': + resolution: {integrity: sha512-oOdAkwqUfW1WqpwSYJce06wvt6HljgY3fGeM9NcVA1HaYOij3mZG9Rkysn0OHuyUAGMbEbARIpsG+LPVlBJ5/Q==} + + '@vue/compiler-dom@3.5.13': + resolution: {integrity: sha512-ZOJ46sMOKUjO3e94wPdCzQ6P1Lx/vhp2RSvfaab88Ajexs0AHeV0uasYhi99WPaogmBlRHNRuly8xV75cNTMDA==} + + '@vue/compiler-sfc@3.5.13': + resolution: {integrity: sha512-6VdaljMpD82w6c2749Zhf5T9u5uLBWKnVue6XWxprDobftnletJ8+oel7sexFfM3qIxNmVE7LSFGTpv6obNyaQ==} + + '@vue/compiler-ssr@3.5.13': + resolution: {integrity: sha512-wMH6vrYHxQl/IybKJagqbquvxpWCuVYpoUJfCqFZwa/JY1GdATAQ+TgVtgrwwMZ0D07QhA99rs/EAAWfvG6KpA==} + + '@vue/reactivity@3.5.13': + resolution: {integrity: sha512-NaCwtw8o48B9I6L1zl2p41OHo/2Z4wqYGGIK1Khu5T7yxrn+ATOixn/Udn2m+6kZKB/J7cuT9DbWWhRxqixACg==} + + '@vue/runtime-core@3.5.13': + resolution: {integrity: sha512-Fj4YRQ3Az0WTZw1sFe+QDb0aXCerigEpw418pw1HBUKFtnQHWzwojaukAs2X/c9DQz4MQ4bsXTGlcpGxU/RCIw==} + + '@vue/runtime-dom@3.5.13': + resolution: {integrity: sha512-dLaj94s93NYLqjLiyFzVs9X6dWhTdAlEAciC3Moq7gzAc13VJUdCnjjRurNM6uTLFATRHexHCTu/Xp3eW6yoog==} + + '@vue/server-renderer@3.5.13': + resolution: {integrity: sha512-wAi4IRJV/2SAW3htkTlB+dHeRmpTiVIK1OGLWV1yeStVSebSQQOwGwIq0D3ZIoBj2C2qpgz5+vX9iEBkTdk5YA==} + peerDependencies: + vue: 3.5.13 + + '@vue/shared@3.5.13': + resolution: {integrity: sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==} + + acorn@8.14.0: + resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} + engines: {node: '>=0.4.0'} + hasBin: true + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-styles@3.2.1: + resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} + engines: {node: '>=4'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + anymatch@3.1.3: + resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} + engines: {node: '>= 8'} + + binary-extensions@2.3.0: + resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} + engines: {node: '>=8'} + + braces@3.0.3: + resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} + engines: {node: '>=8'} + + browserslist@4.24.4: + resolution: {integrity: sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + + buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + + bundle-require@5.1.0: + resolution: {integrity: sha512-3WrrOuZiyaaZPWiEt4G3+IffISVC9HYlWueJEBWED4ZH4aIAC2PnkdnuRrR94M+w6yGWn4AglWtJtBI8YqvgoA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + peerDependencies: + esbuild: '>=0.18' + + cac@6.7.14: + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} + engines: {node: '>=8'} + + caniuse-lite@1.0.30001697: + resolution: {integrity: sha512-GwNPlWJin8E+d7Gxq96jxM6w0w+VFeyyXRsjU58emtkYqnbwHqXm5uT2uCmO0RQE9htWknOP4xtBlLmM/gWxvQ==} + + chalk@2.4.2: + resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} + engines: {node: '>=4'} + + chokidar@3.6.0: + resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} + engines: {node: '>= 8.10.0'} + + cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + + color-convert@1.9.3: + resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.3: + resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + colorette@2.0.20: + resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} + + commander@2.20.3: + resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} + + confbox@0.1.8: + resolution: {integrity: sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==} + + consola@3.4.0: + resolution: {integrity: sha512-EiPU8G6dQG0GFHNR8ljnZFki/8a+cQwEQ+7wpxdChl02Q8HXlwEZWD5lqAF8vC2sEC3Tehr8hy7vErz88LHyUA==} + engines: {node: ^14.18.0 || >=16.10.0} + + convert-source-map@2.0.0: + resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + + css-tree@3.1.0: + resolution: {integrity: sha512-0eW44TGN5SQXU1mWSkKwFstI/22X2bG1nYzZTYMAWjylYURhse752YgbE4Cx46AC+bAvI+/dYTPRk1LqSUnu6w==} + engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} + + csstype@3.1.3: + resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} + + debug@4.4.0: + resolution: {integrity: sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + defu@6.1.4: + resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} + + destr@2.0.3: + resolution: {integrity: sha512-2N3BOUU4gYMpTP24s5rF5iP7BDr7uNTCs4ozw3kf/eKfvWSIu93GEBi5m427YoyJoeOzQ5smuu4nNAPGb8idSQ==} + + didyoumean2@4.1.0: + resolution: {integrity: sha512-qTBmfQoXvhKO75D/05C8m+fteQmn4U46FWYiLhXtZQInzitXLWY0EQ/2oKnpAz9g2lQWW8jYcLcT+hPJGT+kig==} + engines: {node: '>=10.13'} + + duplexer@0.1.2: + resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} + + electron-to-chromium@1.5.93: + resolution: {integrity: sha512-M+29jTcfNNoR9NV7la4SwUqzWAxEwnc7ThA5e1m6LRSotmpfpCpLcIfgtSCVL+MllNLgAyM/5ru86iMRemPzDQ==} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + entities@4.5.0: + resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} + engines: {node: '>=0.12'} + + esbuild@0.23.1: + resolution: {integrity: sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==} + engines: {node: '>=18'} + hasBin: true + + esbuild@0.24.2: + resolution: {integrity: sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==} + engines: {node: '>=18'} + hasBin: true + + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + + escape-string-regexp@1.0.5: + resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} + engines: {node: '>=0.8.0'} + + estree-walker@2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + + fast-glob@3.3.3: + resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==} + engines: {node: '>=8.6.0'} + + fastq@1.19.0: + resolution: {integrity: sha512-7SFSRCNjBQIZH/xZR3iy5iQYR8aGBE0h3VG6/cwlbrpdciNYBMotQav8c1XI3HjHH+NikUpP53nPdlZSdWmFzA==} + + fdir@6.4.3: + resolution: {integrity: sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + + fill-range@7.1.1: + resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} + engines: {node: '>=8'} + + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + gensync@1.0.0-beta.2: + resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} + engines: {node: '>=6.9.0'} + + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + + get-tsconfig@4.10.0: + resolution: {integrity: sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A==} + + glob-parent@5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + + globals@11.12.0: + resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} + engines: {node: '>=4'} + + globals@15.14.0: + resolution: {integrity: sha512-OkToC372DtlQeje9/zHIo5CT8lRP/FUgEOKBEhU4e0abL7J7CD24fD9ohiLN5hagG/kWCYj4K5oaxxtj2Z0Dig==} + engines: {node: '>=18'} + + gzip-size@6.0.0: + resolution: {integrity: sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==} + engines: {node: '>=10'} + + has-flag@3.0.0: + resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} + engines: {node: '>=4'} + + importx@0.5.1: + resolution: {integrity: sha512-YrRaigAec1sC2CdIJjf/hCH1Wp9Ii8Cq5ROw4k5nJ19FVl2FcJUHZ5gGIb1vs8+JNYIyOJpc2fcufS2330bxDw==} + + is-binary-path@2.1.0: + resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} + engines: {node: '>=8'} + + is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + + is-number@7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + + jiti@2.4.2: + resolution: {integrity: sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==} + hasBin: true + + js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + + jsesc@3.1.0: + resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==} + engines: {node: '>=6'} + hasBin: true + + json5@2.2.3: + resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} + engines: {node: '>=6'} + hasBin: true + + kolorist@1.8.0: + resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==} + + leven@3.1.0: + resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} + engines: {node: '>=6'} + + lit-analyzer@2.0.3: + resolution: {integrity: sha512-XiAjnwVipNrKav7r3CSEZpWt+mwYxrhPRVC7h8knDmn/HWTzzWJvPe+mwBcL2brn4xhItAMzZhFC8tzzqHKmiQ==} + hasBin: true + + lit-element@4.1.1: + resolution: {integrity: sha512-HO9Tkkh34QkTeUmEdNYhMT8hzLid7YlMlATSi1q4q17HE5d9mrrEHJ/o8O2D0cMi182zK1F3v7x0PWFjrhXFew==} + + lit-html@3.2.1: + resolution: {integrity: sha512-qI/3lziaPMSKsrwlxH/xMgikhQ0EGOX2ICU73Bi/YHFvz2j/yMCIrw4+puF2IpQ4+upd3EWbvnHM9+PnJn48YA==} + + lit@3.2.1: + resolution: {integrity: sha512-1BBa1E/z0O9ye5fZprPtdqnc0BFzxIxTTOO/tQFmyC/hj1O3jL4TfmLBw0WEwjAokdLwpclkvGgDJwTIh0/22w==} + + load-tsconfig@0.2.5: + resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + local-pkg@1.0.0: + resolution: {integrity: sha512-bbgPw/wmroJsil/GgL4qjDzs5YLTBMQ99weRsok1XCDccQeehbHA/I1oRvk2NPtr7KGZgT/Y5tPRnAtMqeG2Kg==} + engines: {node: '>=14'} + + lodash.deburr@4.1.0: + resolution: {integrity: sha512-m/M1U1f3ddMCs6Hq2tAsYThTBDaAKFDX3dwDo97GEYzamXi9SqUpjWi/Rrj/gf3X2n8ktwgZrlP1z6E3v/IExQ==} + + lru-cache@5.1.1: + resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + + magic-string@0.30.17: + resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} + + mdn-data@2.12.2: + resolution: {integrity: sha512-IEn+pegP1aManZuckezWCO+XZQDplx1366JoVhTpMpBB1sPey/SbveZQUosKiKiGYjg1wH4pMlNgXbCiYgihQA==} + + merge2@1.4.1: + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} + + micromatch@4.0.8: + resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} + engines: {node: '>=8.6'} + + mlly@1.7.4: + resolution: {integrity: sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw==} + + mrmime@2.0.0: + resolution: {integrity: sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==} + engines: {node: '>=10'} + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + nanoid@3.3.8: + resolution: {integrity: sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + + node-fetch-native@1.6.6: + resolution: {integrity: sha512-8Mc2HhqPdlIfedsuZoc3yioPuzp6b+L5jRCRY1QzuWZh2EGJVQrGppC6V6cF0bLdbW0+O2YpqCA25aF/1lvipQ==} + + node-releases@2.0.19: + resolution: {integrity: sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==} + + normalize-path@3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + + ofetch@1.4.1: + resolution: {integrity: sha512-QZj2DfGplQAr2oj9KzceK9Hwz6Whxazmn85yYeVuS3u9XTMOGMRx0kO95MQ+vLsj/S/NwBDMMLU5hpxvI6Tklw==} + + package-manager-detector@0.2.9: + resolution: {integrity: sha512-+vYvA/Y31l8Zk8dwxHhL3JfTuHPm6tlxM2A3GeQyl7ovYnSp1+mzAxClxaOr0qO1TtPxbQxetI7v5XqKLJZk7Q==} + + parse5@5.1.0: + resolution: {integrity: sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ==} + + pathe@1.1.2: + resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} + + pathe@2.0.2: + resolution: {integrity: sha512-15Ztpk+nov8DR524R4BF7uEuzESgzUEAV4Ah7CUMNGXdE5ELuvxElxGXndBl32vMSsWa1jpNf22Z+Er3sKwq+w==} + + perfect-debounce@1.0.0: + resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + picomatch@2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + + picomatch@4.0.2: + resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} + engines: {node: '>=12'} + + pkg-types@1.3.1: + resolution: {integrity: sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==} + + postcss@8.5.1: + resolution: {integrity: sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ==} + engines: {node: ^10 || ^12 || >=14} + + queue-microtask@1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + + react-dom@19.0.0: + resolution: {integrity: sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==} + peerDependencies: + react: ^19.0.0 + + react-refresh@0.14.2: + resolution: {integrity: sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==} + engines: {node: '>=0.10.0'} + + react@19.0.0: + resolution: {integrity: sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==} + engines: {node: '>=0.10.0'} + + readdirp@3.6.0: + resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} + engines: {node: '>=8.10.0'} + + regenerator-runtime@0.14.1: + resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} + + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + + resolve-pkg-maps@1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + + reusify@1.0.4: + resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + + rollup@4.34.4: + resolution: {integrity: sha512-spF66xoyD7rz3o08sHP7wogp1gZ6itSq22SGa/IZTcUDXDlOyrShwMwkVSB+BUxFRZZCUYqdb3KWDEOMVQZxuw==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + + run-parallel@1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + + scheduler@0.25.0: + resolution: {integrity: sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==} + + semver@6.3.1: + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} + hasBin: true + + sirv@3.0.0: + resolution: {integrity: sha512-BPwJGUeDaDCHihkORDchNyyTvWFhcusy1XMmhEVTQTwGeybFbp8YEmB+njbPnth1FibULBSBVwCQni25XlCUDg==} + engines: {node: '>=18'} + + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + engines: {node: '>=0.10.0'} + + source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + + source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + supports-color@5.5.0: + resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} + engines: {node: '>=4'} + + terser@5.38.0: + resolution: {integrity: sha512-a4GD5R1TjEeuCT6ZRiYMHmIf7okbCPEuhQET8bczV6FrQMMlFXA1n+G0KKjdlFCm3TEHV77GxfZB3vZSUQGFpg==} + engines: {node: '>=10'} + hasBin: true + + tinyexec@0.3.2: + resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} + + tinyglobby@0.2.10: + resolution: {integrity: sha512-Zc+8eJlFMvgatPZTl6A9L/yht8QqdmUNtURHaKZLmKBE12hNPSrqNkUp2cs3M/UKmNVVAMFQYSjYIVHDjW5zew==} + engines: {node: '>=12.0.0'} + + to-regex-range@5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + + totalist@3.0.1: + resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} + engines: {node: '>=6'} + + ts-lit-plugin@2.0.2: + resolution: {integrity: sha512-DPXlVxhjWHxg8AyBLcfSYt2JXgpANV1ssxxwjY98o26gD8MzeiM68HFW9c2VeDd1CjoR3w7B/6/uKxwBQe+ioA==} + + ts-simple-type@2.0.0-next.0: + resolution: {integrity: sha512-A+hLX83gS+yH6DtzNAhzZbPfU+D9D8lHlTSd7GeoMRBjOt3GRylDqLTYbdmjA4biWvq2xSfpqfIDj2l0OA/BVg==} + + tsx@4.19.2: + resolution: {integrity: sha512-pOUl6Vo2LUq/bSa8S5q7b91cgNSjctn9ugq/+Mvow99qW6x/UZYwzxy/3NmqoT66eHYfCVvFvACC58UBPFf28g==} + engines: {node: '>=18.0.0'} + hasBin: true + + typescript@5.2.2: + resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==} + engines: {node: '>=14.17'} + hasBin: true + + typescript@5.7.3: + resolution: {integrity: sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==} + engines: {node: '>=14.17'} + hasBin: true + + ufo@1.5.4: + resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==} + + unconfig@0.6.1: + resolution: {integrity: sha512-cVU+/sPloZqOyJEAfNwnQSFCzFrZm85vcVkryH7lnlB/PiTycUkAjt5Ds79cfIshGOZ+M5v3PBDnKgpmlE5DtA==} + + undici-types@6.20.0: + resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} + + unocss@65.4.3: + resolution: {integrity: sha512-mwSVi0ovPxaDv58yFB7Vm5v1x/q/pUc7aTh7SJbeYoRrpbUGdKiVf20YSQfMqmBNXV9CFDr4o6tabP/58as6RQ==} + engines: {node: '>=14'} + peerDependencies: + '@unocss/webpack': 65.4.3 + vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0 + peerDependenciesMeta: + '@unocss/webpack': + optional: true + vite: + optional: true + + unplugin@2.1.2: + resolution: {integrity: sha512-Q3LU0e4zxKfRko1wMV2HmP8lB9KWislY7hxXpxd+lGx0PRInE4vhMBVEZwpdVYHvtqzhSrzuIfErsob6bQfCzw==} + engines: {node: '>=18.12.0'} + + update-browserslist-db@1.1.2: + resolution: {integrity: sha512-PPypAm5qvlD7XMZC3BujecnaOxwhrtoFR+Dqkk5Aa/6DssiH0ibKoketaj9w8LP7Bont1rYeoV5plxD7RTEPRg==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + + vite@6.1.0: + resolution: {integrity: sha512-RjjMipCKVoR4hVfPY6GQTgveinjNuyLw+qruksLDvA5ktI1150VmcMBKmQaEWJhg/j6Uaf6dNCNA0AfdzUb/hQ==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 + jiti: '>=1.21.0' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + sass-embedded: '*' + stylus: '*' + sugarss: '*' + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + jiti: + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + + vscode-css-languageservice@4.3.0: + resolution: {integrity: sha512-BkQAMz4oVHjr0oOAz5PdeE72txlLQK7NIwzmclfr+b6fj6I8POwB+VoXvrZLTbWt9hWRgfvgiQRkh5JwrjPJ5A==} + + vscode-html-languageservice@3.1.0: + resolution: {integrity: sha512-QAyRHI98bbEIBCqTzZVA0VblGU40na0txggongw5ZgTj9UVsVk5XbLT16O9OTcbqBGSqn0oWmFDNjK/XGIDcqg==} + + vscode-languageserver-textdocument@1.0.12: + resolution: {integrity: sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA==} + + vscode-languageserver-types@3.16.0-next.2: + resolution: {integrity: sha512-QjXB7CKIfFzKbiCJC4OWC8xUncLsxo19FzGVp/ADFvvi87PlmBSCAtZI5xwGjF5qE0xkLf0jjKUn3DzmpDP52Q==} + + vscode-nls@4.1.2: + resolution: {integrity: sha512-7bOHxPsfyuCqmP+hZXscLhiHwe7CSuFE4hyhbs22xPIhQ4jv99FcR4eBzfYYVLP356HNFpdvz63FFb/xw6T4Iw==} + + vscode-uri@2.1.2: + resolution: {integrity: sha512-8TEXQxlldWAuIODdukIb+TR5s+9Ds40eSJrw+1iDDA9IFORPjMELarNQE3myz5XIkWWpdprmJjm1/SxMlWOC8A==} + + vue-flow-layout@0.1.1: + resolution: {integrity: sha512-JdgRRUVrN0Y2GosA0M68DEbKlXMqJ7FQgsK8CjQD2vxvNSqAU6PZEpi4cfcTVtfM2GVOMjHo7GKKLbXxOBqDqA==} + peerDependencies: + vue: ^3.4.37 + + vue@3.5.13: + resolution: {integrity: sha512-wmeiSMxkZCSc+PM2w2VRsOYAZC8GdipNFRTsLSfodVqI9mbejKeXEGr8SckuLnrQPGe3oJN5c3K0vpoU9q/wCQ==} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + web-component-analyzer@2.0.0: + resolution: {integrity: sha512-UEvwfpD+XQw99sLKiH5B1T4QwpwNyWJxp59cnlRwFfhUW6JsQpw5jMeMwi7580sNou8YL3kYoS7BWLm+yJ/jVQ==} + hasBin: true + + webpack-sources@3.2.3: + resolution: {integrity: sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==} + engines: {node: '>=10.13.0'} + + webpack-virtual-modules@0.6.2: + resolution: {integrity: sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==} + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + + yallist@3.1.1: + resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} + + yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + + yargs@17.7.2: + resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} + engines: {node: '>=12'} + +snapshots: + + '@ampproject/remapping@2.3.0': + dependencies: + '@jridgewell/gen-mapping': 0.3.8 + '@jridgewell/trace-mapping': 0.3.25 + + '@antfu/install-pkg@1.0.0': + dependencies: + package-manager-detector: 0.2.9 + tinyexec: 0.3.2 + + '@antfu/utils@8.1.0': {} + + '@babel/code-frame@7.26.2': + dependencies: + '@babel/helper-validator-identifier': 7.25.9 + js-tokens: 4.0.0 + picocolors: 1.1.1 + + '@babel/compat-data@7.26.5': {} + + '@babel/core@7.26.7': + dependencies: + '@ampproject/remapping': 2.3.0 + '@babel/code-frame': 7.26.2 + '@babel/generator': 7.26.5 + '@babel/helper-compilation-targets': 7.26.5 + '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.7) + '@babel/helpers': 7.26.7 + '@babel/parser': 7.26.7 + '@babel/template': 7.25.9 + '@babel/traverse': 7.26.7 + '@babel/types': 7.26.7 + convert-source-map: 2.0.0 + debug: 4.4.0 + gensync: 1.0.0-beta.2 + json5: 2.2.3 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + + '@babel/generator@7.26.5': + dependencies: + '@babel/parser': 7.26.7 + '@babel/types': 7.26.7 + '@jridgewell/gen-mapping': 0.3.8 + '@jridgewell/trace-mapping': 0.3.25 + jsesc: 3.1.0 + + '@babel/helper-compilation-targets@7.26.5': + dependencies: + '@babel/compat-data': 7.26.5 + '@babel/helper-validator-option': 7.25.9 + browserslist: 4.24.4 + lru-cache: 5.1.1 + semver: 6.3.1 + + '@babel/helper-module-imports@7.25.9': + dependencies: + '@babel/traverse': 7.26.7 + '@babel/types': 7.26.7 + transitivePeerDependencies: + - supports-color + + '@babel/helper-module-transforms@7.26.0(@babel/core@7.26.7)': + dependencies: + '@babel/core': 7.26.7 + '@babel/helper-module-imports': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + '@babel/traverse': 7.26.7 + transitivePeerDependencies: + - supports-color + + '@babel/helper-plugin-utils@7.26.5': {} + + '@babel/helper-string-parser@7.25.9': {} + + '@babel/helper-validator-identifier@7.25.9': {} + + '@babel/helper-validator-option@7.25.9': {} + + '@babel/helpers@7.26.7': + dependencies: + '@babel/template': 7.25.9 + '@babel/types': 7.26.7 + + '@babel/parser@7.26.7': + dependencies: + '@babel/types': 7.26.7 + + '@babel/plugin-transform-react-jsx-self@7.25.9(@babel/core@7.26.7)': + dependencies: + '@babel/core': 7.26.7 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-transform-react-jsx-source@7.25.9(@babel/core@7.26.7)': + dependencies: + '@babel/core': 7.26.7 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/runtime@7.26.7': + dependencies: + regenerator-runtime: 0.14.1 + + '@babel/template@7.25.9': + dependencies: + '@babel/code-frame': 7.26.2 + '@babel/parser': 7.26.7 + '@babel/types': 7.26.7 + + '@babel/traverse@7.26.7': + dependencies: + '@babel/code-frame': 7.26.2 + '@babel/generator': 7.26.5 + '@babel/parser': 7.26.7 + '@babel/template': 7.25.9 + '@babel/types': 7.26.7 + debug: 4.4.0 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + + '@babel/types@7.26.7': + dependencies: + '@babel/helper-string-parser': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + + '@biomejs/biome@1.9.4': + optionalDependencies: + '@biomejs/cli-darwin-arm64': 1.9.4 + '@biomejs/cli-darwin-x64': 1.9.4 + '@biomejs/cli-linux-arm64': 1.9.4 + '@biomejs/cli-linux-arm64-musl': 1.9.4 + '@biomejs/cli-linux-x64': 1.9.4 + '@biomejs/cli-linux-x64-musl': 1.9.4 + '@biomejs/cli-win32-arm64': 1.9.4 + '@biomejs/cli-win32-x64': 1.9.4 + + '@biomejs/cli-darwin-arm64@1.9.4': + optional: true + + '@biomejs/cli-darwin-x64@1.9.4': + optional: true + + '@biomejs/cli-linux-arm64-musl@1.9.4': + optional: true + + '@biomejs/cli-linux-arm64@1.9.4': + optional: true + + '@biomejs/cli-linux-x64-musl@1.9.4': + optional: true + + '@biomejs/cli-linux-x64@1.9.4': + optional: true + + '@biomejs/cli-win32-arm64@1.9.4': + optional: true + + '@biomejs/cli-win32-x64@1.9.4': + optional: true + + '@esbuild/aix-ppc64@0.23.1': + optional: true + + '@esbuild/aix-ppc64@0.24.2': + optional: true + + '@esbuild/android-arm64@0.23.1': + optional: true + + '@esbuild/android-arm64@0.24.2': + optional: true + + '@esbuild/android-arm@0.23.1': + optional: true + + '@esbuild/android-arm@0.24.2': + optional: true + + '@esbuild/android-x64@0.23.1': + optional: true + + '@esbuild/android-x64@0.24.2': + optional: true + + '@esbuild/darwin-arm64@0.23.1': + optional: true + + '@esbuild/darwin-arm64@0.24.2': + optional: true + + '@esbuild/darwin-x64@0.23.1': + optional: true + + '@esbuild/darwin-x64@0.24.2': + optional: true + + '@esbuild/freebsd-arm64@0.23.1': + optional: true + + '@esbuild/freebsd-arm64@0.24.2': + optional: true + + '@esbuild/freebsd-x64@0.23.1': + optional: true + + '@esbuild/freebsd-x64@0.24.2': + optional: true + + '@esbuild/linux-arm64@0.23.1': + optional: true + + '@esbuild/linux-arm64@0.24.2': + optional: true + + '@esbuild/linux-arm@0.23.1': + optional: true + + '@esbuild/linux-arm@0.24.2': + optional: true + + '@esbuild/linux-ia32@0.23.1': + optional: true + + '@esbuild/linux-ia32@0.24.2': + optional: true + + '@esbuild/linux-loong64@0.23.1': + optional: true + + '@esbuild/linux-loong64@0.24.2': + optional: true + + '@esbuild/linux-mips64el@0.23.1': + optional: true + + '@esbuild/linux-mips64el@0.24.2': + optional: true + + '@esbuild/linux-ppc64@0.23.1': + optional: true + + '@esbuild/linux-ppc64@0.24.2': + optional: true + + '@esbuild/linux-riscv64@0.23.1': + optional: true + + '@esbuild/linux-riscv64@0.24.2': + optional: true + + '@esbuild/linux-s390x@0.23.1': + optional: true + + '@esbuild/linux-s390x@0.24.2': + optional: true + + '@esbuild/linux-x64@0.23.1': + optional: true + + '@esbuild/linux-x64@0.24.2': + optional: true + + '@esbuild/netbsd-arm64@0.24.2': + optional: true + + '@esbuild/netbsd-x64@0.23.1': + optional: true + + '@esbuild/netbsd-x64@0.24.2': + optional: true + + '@esbuild/openbsd-arm64@0.23.1': + optional: true + + '@esbuild/openbsd-arm64@0.24.2': + optional: true + + '@esbuild/openbsd-x64@0.23.1': + optional: true + + '@esbuild/openbsd-x64@0.24.2': + optional: true + + '@esbuild/sunos-x64@0.23.1': + optional: true + + '@esbuild/sunos-x64@0.24.2': + optional: true + + '@esbuild/win32-arm64@0.23.1': + optional: true + + '@esbuild/win32-arm64@0.24.2': + optional: true + + '@esbuild/win32-ia32@0.23.1': + optional: true + + '@esbuild/win32-ia32@0.24.2': + optional: true + + '@esbuild/win32-x64@0.23.1': + optional: true + + '@esbuild/win32-x64@0.24.2': + optional: true + + '@iconify/types@2.0.0': {} + + '@iconify/utils@2.3.0': + dependencies: + '@antfu/install-pkg': 1.0.0 + '@antfu/utils': 8.1.0 + '@iconify/types': 2.0.0 + debug: 4.4.0 + globals: 15.14.0 + kolorist: 1.8.0 + local-pkg: 1.0.0 + mlly: 1.7.4 + transitivePeerDependencies: + - supports-color + + '@jridgewell/gen-mapping@0.3.8': + dependencies: + '@jridgewell/set-array': 1.2.1 + '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/trace-mapping': 0.3.25 + + '@jridgewell/resolve-uri@3.1.2': {} + + '@jridgewell/set-array@1.2.1': {} + + '@jridgewell/source-map@0.3.6': + dependencies: + '@jridgewell/gen-mapping': 0.3.8 + '@jridgewell/trace-mapping': 0.3.25 + optional: true + + '@jridgewell/sourcemap-codec@1.5.0': {} + + '@jridgewell/trace-mapping@0.3.25': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.0 + + '@lit-labs/ssr-dom-shim@1.3.0': {} + + '@lit/react@1.0.7(@types/react@19.0.8)': + dependencies: + '@types/react': 19.0.8 + + '@lit/reactive-element@2.0.4': + dependencies: + '@lit-labs/ssr-dom-shim': 1.3.0 + + '@nodelib/fs.scandir@2.1.5': + dependencies: + '@nodelib/fs.stat': 2.0.5 + run-parallel: 1.2.0 + + '@nodelib/fs.stat@2.0.5': {} + + '@nodelib/fs.walk@1.2.8': + dependencies: + '@nodelib/fs.scandir': 2.1.5 + fastq: 1.19.0 + + '@polka/url@1.0.0-next.28': {} + + '@rollup/pluginutils@5.1.4(rollup@4.34.4)': + dependencies: + '@types/estree': 1.0.6 + estree-walker: 2.0.2 + picomatch: 4.0.2 + optionalDependencies: + rollup: 4.34.4 + + '@rollup/rollup-android-arm-eabi@4.34.4': + optional: true + + '@rollup/rollup-android-arm64@4.34.4': + optional: true + + '@rollup/rollup-darwin-arm64@4.34.4': + optional: true + + '@rollup/rollup-darwin-x64@4.34.4': + optional: true + + '@rollup/rollup-freebsd-arm64@4.34.4': + optional: true + + '@rollup/rollup-freebsd-x64@4.34.4': + optional: true + + '@rollup/rollup-linux-arm-gnueabihf@4.34.4': + optional: true + + '@rollup/rollup-linux-arm-musleabihf@4.34.4': + optional: true + + '@rollup/rollup-linux-arm64-gnu@4.34.4': + optional: true + + '@rollup/rollup-linux-arm64-musl@4.34.4': + optional: true + + '@rollup/rollup-linux-loongarch64-gnu@4.34.4': + optional: true + + '@rollup/rollup-linux-powerpc64le-gnu@4.34.4': + optional: true + + '@rollup/rollup-linux-riscv64-gnu@4.34.4': + optional: true + + '@rollup/rollup-linux-s390x-gnu@4.34.4': + optional: true + + '@rollup/rollup-linux-x64-gnu@4.34.4': + optional: true + + '@rollup/rollup-linux-x64-musl@4.34.4': + optional: true + + '@rollup/rollup-win32-arm64-msvc@4.34.4': + optional: true + + '@rollup/rollup-win32-ia32-msvc@4.34.4': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.34.4': + optional: true + + '@types/babel__core@7.20.5': + dependencies: + '@babel/parser': 7.26.7 + '@babel/types': 7.26.7 + '@types/babel__generator': 7.6.8 + '@types/babel__template': 7.4.4 + '@types/babel__traverse': 7.20.6 + + '@types/babel__generator@7.6.8': + dependencies: + '@babel/types': 7.26.7 + + '@types/babel__template@7.4.4': + dependencies: + '@babel/parser': 7.26.7 + '@babel/types': 7.26.7 + + '@types/babel__traverse@7.20.6': + dependencies: + '@babel/types': 7.26.7 + + '@types/estree@1.0.6': {} + + '@types/node@22.13.1': + dependencies: + undici-types: 6.20.0 + optional: true + + '@types/react-dom@19.0.3(@types/react@19.0.8)': + dependencies: + '@types/react': 19.0.8 + + '@types/react@19.0.8': + dependencies: + csstype: 3.1.3 + + '@types/trusted-types@2.0.7': {} + + '@unocss/astro@65.4.3(rollup@4.34.4)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.7.3))': + dependencies: + '@unocss/core': 65.4.3 + '@unocss/reset': 65.4.3 + '@unocss/vite': 65.4.3(rollup@4.34.4)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.7.3)) + optionalDependencies: + vite: 6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2) + transitivePeerDependencies: + - rollup + - supports-color + - vue + + '@unocss/cli@65.4.3(rollup@4.34.4)': + dependencies: + '@ampproject/remapping': 2.3.0 + '@rollup/pluginutils': 5.1.4(rollup@4.34.4) + '@unocss/config': 65.4.3 + '@unocss/core': 65.4.3 + '@unocss/preset-uno': 65.4.3 + cac: 6.7.14 + chokidar: 3.6.0 + colorette: 2.0.20 + consola: 3.4.0 + magic-string: 0.30.17 + pathe: 2.0.2 + perfect-debounce: 1.0.0 + tinyglobby: 0.2.10 + transitivePeerDependencies: + - rollup + - supports-color + + '@unocss/config@65.4.3': + dependencies: + '@unocss/core': 65.4.3 + unconfig: 0.6.1 + transitivePeerDependencies: + - supports-color + + '@unocss/core@65.4.3': {} + + '@unocss/extractor-arbitrary-variants@65.4.3': + dependencies: + '@unocss/core': 65.4.3 + + '@unocss/inspector@65.4.3(vue@3.5.13(typescript@5.7.3))': + dependencies: + '@unocss/core': 65.4.3 + '@unocss/rule-utils': 65.4.3 + colorette: 2.0.20 + gzip-size: 6.0.0 + sirv: 3.0.0 + vue-flow-layout: 0.1.1(vue@3.5.13(typescript@5.7.3)) + transitivePeerDependencies: + - vue + + '@unocss/postcss@65.4.3(postcss@8.5.1)': + dependencies: + '@unocss/config': 65.4.3 + '@unocss/core': 65.4.3 + '@unocss/rule-utils': 65.4.3 + css-tree: 3.1.0 + postcss: 8.5.1 + tinyglobby: 0.2.10 + transitivePeerDependencies: + - supports-color + + '@unocss/preset-attributify@65.4.3': + dependencies: + '@unocss/core': 65.4.3 + + '@unocss/preset-icons@65.4.3': + dependencies: + '@iconify/utils': 2.3.0 + '@unocss/core': 65.4.3 + ofetch: 1.4.1 + transitivePeerDependencies: + - supports-color + + '@unocss/preset-mini@65.4.3': + dependencies: + '@unocss/core': 65.4.3 + '@unocss/extractor-arbitrary-variants': 65.4.3 + '@unocss/rule-utils': 65.4.3 + + '@unocss/preset-tagify@65.4.3': + dependencies: + '@unocss/core': 65.4.3 + + '@unocss/preset-typography@65.4.3': + dependencies: + '@unocss/core': 65.4.3 + '@unocss/preset-mini': 65.4.3 + + '@unocss/preset-uno@65.4.3': + dependencies: + '@unocss/core': 65.4.3 + '@unocss/preset-mini': 65.4.3 + '@unocss/preset-wind': 65.4.3 + '@unocss/rule-utils': 65.4.3 + + '@unocss/preset-web-fonts@65.4.3': + dependencies: + '@unocss/core': 65.4.3 + ofetch: 1.4.1 + + '@unocss/preset-wind@65.4.3': + dependencies: + '@unocss/core': 65.4.3 + '@unocss/preset-mini': 65.4.3 + '@unocss/rule-utils': 65.4.3 + + '@unocss/reset@65.4.3': {} + + '@unocss/rule-utils@65.4.3': + dependencies: + '@unocss/core': 65.4.3 + magic-string: 0.30.17 + + '@unocss/transformer-attributify-jsx@65.4.3': + dependencies: + '@unocss/core': 65.4.3 + + '@unocss/transformer-compile-class@65.4.3': + dependencies: + '@unocss/core': 65.4.3 + + '@unocss/transformer-directives@65.4.3': + dependencies: + '@unocss/core': 65.4.3 + '@unocss/rule-utils': 65.4.3 + css-tree: 3.1.0 + + '@unocss/transformer-variant-group@65.4.3': + dependencies: + '@unocss/core': 65.4.3 + + '@unocss/vite@65.4.3(rollup@4.34.4)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.7.3))': + dependencies: + '@ampproject/remapping': 2.3.0 + '@rollup/pluginutils': 5.1.4(rollup@4.34.4) + '@unocss/config': 65.4.3 + '@unocss/core': 65.4.3 + '@unocss/inspector': 65.4.3(vue@3.5.13(typescript@5.7.3)) + chokidar: 3.6.0 + magic-string: 0.30.17 + tinyglobby: 0.2.10 + vite: 6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2) + transitivePeerDependencies: + - rollup + - supports-color + - vue + + '@unocss/webpack@65.4.3(rollup@4.34.4)': + dependencies: + '@ampproject/remapping': 2.3.0 + '@rollup/pluginutils': 5.1.4(rollup@4.34.4) + '@unocss/config': 65.4.3 + '@unocss/core': 65.4.3 + chokidar: 3.6.0 + magic-string: 0.30.17 + tinyglobby: 0.2.10 + unplugin: 2.1.2 + webpack-sources: 3.2.3 + transitivePeerDependencies: + - rollup + - supports-color + optional: true + + '@vitejs/plugin-react@4.3.4(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2))': + dependencies: + '@babel/core': 7.26.7 + '@babel/plugin-transform-react-jsx-self': 7.25.9(@babel/core@7.26.7) + '@babel/plugin-transform-react-jsx-source': 7.25.9(@babel/core@7.26.7) + '@types/babel__core': 7.20.5 + react-refresh: 0.14.2 + vite: 6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2) + transitivePeerDependencies: + - supports-color + + '@vscode/web-custom-data@0.4.13': {} + + '@vue/compiler-core@3.5.13': + dependencies: + '@babel/parser': 7.26.7 + '@vue/shared': 3.5.13 + entities: 4.5.0 + estree-walker: 2.0.2 + source-map-js: 1.2.1 + + '@vue/compiler-dom@3.5.13': + dependencies: + '@vue/compiler-core': 3.5.13 + '@vue/shared': 3.5.13 + + '@vue/compiler-sfc@3.5.13': + dependencies: + '@babel/parser': 7.26.7 + '@vue/compiler-core': 3.5.13 + '@vue/compiler-dom': 3.5.13 + '@vue/compiler-ssr': 3.5.13 + '@vue/shared': 3.5.13 + estree-walker: 2.0.2 + magic-string: 0.30.17 + postcss: 8.5.1 + source-map-js: 1.2.1 + + '@vue/compiler-ssr@3.5.13': + dependencies: + '@vue/compiler-dom': 3.5.13 + '@vue/shared': 3.5.13 + + '@vue/reactivity@3.5.13': + dependencies: + '@vue/shared': 3.5.13 + + '@vue/runtime-core@3.5.13': + dependencies: + '@vue/reactivity': 3.5.13 + '@vue/shared': 3.5.13 + + '@vue/runtime-dom@3.5.13': + dependencies: + '@vue/reactivity': 3.5.13 + '@vue/runtime-core': 3.5.13 + '@vue/shared': 3.5.13 + csstype: 3.1.3 + + '@vue/server-renderer@3.5.13(vue@3.5.13(typescript@5.7.3))': + dependencies: + '@vue/compiler-ssr': 3.5.13 + '@vue/shared': 3.5.13 + vue: 3.5.13(typescript@5.7.3) + + '@vue/shared@3.5.13': {} + + acorn@8.14.0: {} + + ansi-regex@5.0.1: {} + + ansi-styles@3.2.1: + dependencies: + color-convert: 1.9.3 + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + anymatch@3.1.3: + dependencies: + normalize-path: 3.0.0 + picomatch: 2.3.1 + + binary-extensions@2.3.0: {} + + braces@3.0.3: + dependencies: + fill-range: 7.1.1 + + browserslist@4.24.4: + dependencies: + caniuse-lite: 1.0.30001697 + electron-to-chromium: 1.5.93 + node-releases: 2.0.19 + update-browserslist-db: 1.1.2(browserslist@4.24.4) + + buffer-from@1.1.2: + optional: true + + bundle-require@5.1.0(esbuild@0.24.2): + dependencies: + esbuild: 0.24.2 + load-tsconfig: 0.2.5 + + cac@6.7.14: {} + + caniuse-lite@1.0.30001697: {} + + chalk@2.4.2: + dependencies: + ansi-styles: 3.2.1 + escape-string-regexp: 1.0.5 + supports-color: 5.5.0 + + chokidar@3.6.0: + dependencies: + anymatch: 3.1.3 + braces: 3.0.3 + glob-parent: 5.1.2 + is-binary-path: 2.1.0 + is-glob: 4.0.3 + normalize-path: 3.0.0 + readdirp: 3.6.0 + optionalDependencies: + fsevents: 2.3.3 + + cliui@8.0.1: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + + color-convert@1.9.3: + dependencies: + color-name: 1.1.3 + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.3: {} + + color-name@1.1.4: {} + + colorette@2.0.20: {} + + commander@2.20.3: + optional: true + + confbox@0.1.8: {} + + consola@3.4.0: {} + + convert-source-map@2.0.0: {} + + css-tree@3.1.0: + dependencies: + mdn-data: 2.12.2 + source-map-js: 1.2.1 + + csstype@3.1.3: {} + + debug@4.4.0: + dependencies: + ms: 2.1.3 + + defu@6.1.4: {} + + destr@2.0.3: {} + + didyoumean2@4.1.0: + dependencies: + '@babel/runtime': 7.26.7 + leven: 3.1.0 + lodash.deburr: 4.1.0 + + duplexer@0.1.2: {} + + electron-to-chromium@1.5.93: {} + + emoji-regex@8.0.0: {} + + entities@4.5.0: {} + + esbuild@0.23.1: + optionalDependencies: + '@esbuild/aix-ppc64': 0.23.1 + '@esbuild/android-arm': 0.23.1 + '@esbuild/android-arm64': 0.23.1 + '@esbuild/android-x64': 0.23.1 + '@esbuild/darwin-arm64': 0.23.1 + '@esbuild/darwin-x64': 0.23.1 + '@esbuild/freebsd-arm64': 0.23.1 + '@esbuild/freebsd-x64': 0.23.1 + '@esbuild/linux-arm': 0.23.1 + '@esbuild/linux-arm64': 0.23.1 + '@esbuild/linux-ia32': 0.23.1 + '@esbuild/linux-loong64': 0.23.1 + '@esbuild/linux-mips64el': 0.23.1 + '@esbuild/linux-ppc64': 0.23.1 + '@esbuild/linux-riscv64': 0.23.1 + '@esbuild/linux-s390x': 0.23.1 + '@esbuild/linux-x64': 0.23.1 + '@esbuild/netbsd-x64': 0.23.1 + '@esbuild/openbsd-arm64': 0.23.1 + '@esbuild/openbsd-x64': 0.23.1 + '@esbuild/sunos-x64': 0.23.1 + '@esbuild/win32-arm64': 0.23.1 + '@esbuild/win32-ia32': 0.23.1 + '@esbuild/win32-x64': 0.23.1 + + esbuild@0.24.2: + optionalDependencies: + '@esbuild/aix-ppc64': 0.24.2 + '@esbuild/android-arm': 0.24.2 + '@esbuild/android-arm64': 0.24.2 + '@esbuild/android-x64': 0.24.2 + '@esbuild/darwin-arm64': 0.24.2 + '@esbuild/darwin-x64': 0.24.2 + '@esbuild/freebsd-arm64': 0.24.2 + '@esbuild/freebsd-x64': 0.24.2 + '@esbuild/linux-arm': 0.24.2 + '@esbuild/linux-arm64': 0.24.2 + '@esbuild/linux-ia32': 0.24.2 + '@esbuild/linux-loong64': 0.24.2 + '@esbuild/linux-mips64el': 0.24.2 + '@esbuild/linux-ppc64': 0.24.2 + '@esbuild/linux-riscv64': 0.24.2 + '@esbuild/linux-s390x': 0.24.2 + '@esbuild/linux-x64': 0.24.2 + '@esbuild/netbsd-arm64': 0.24.2 + '@esbuild/netbsd-x64': 0.24.2 + '@esbuild/openbsd-arm64': 0.24.2 + '@esbuild/openbsd-x64': 0.24.2 + '@esbuild/sunos-x64': 0.24.2 + '@esbuild/win32-arm64': 0.24.2 + '@esbuild/win32-ia32': 0.24.2 + '@esbuild/win32-x64': 0.24.2 + + escalade@3.2.0: {} + + escape-string-regexp@1.0.5: {} + + estree-walker@2.0.2: {} + + fast-glob@3.3.3: + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.8 + + fastq@1.19.0: + dependencies: + reusify: 1.0.4 + + fdir@6.4.3(picomatch@4.0.2): + optionalDependencies: + picomatch: 4.0.2 + + fill-range@7.1.1: + dependencies: + to-regex-range: 5.0.1 + + fsevents@2.3.3: + optional: true + + gensync@1.0.0-beta.2: {} + + get-caller-file@2.0.5: {} + + get-tsconfig@4.10.0: + dependencies: + resolve-pkg-maps: 1.0.0 + + glob-parent@5.1.2: + dependencies: + is-glob: 4.0.3 + + globals@11.12.0: {} + + globals@15.14.0: {} + + gzip-size@6.0.0: + dependencies: + duplexer: 0.1.2 + + has-flag@3.0.0: {} + + importx@0.5.1: + dependencies: + bundle-require: 5.1.0(esbuild@0.24.2) + debug: 4.4.0 + esbuild: 0.24.2 + jiti: 2.4.2 + pathe: 1.1.2 + tsx: 4.19.2 + transitivePeerDependencies: + - supports-color + + is-binary-path@2.1.0: + dependencies: + binary-extensions: 2.3.0 + + is-extglob@2.1.1: {} + + is-fullwidth-code-point@3.0.0: {} + + is-glob@4.0.3: + dependencies: + is-extglob: 2.1.1 + + is-number@7.0.0: {} + + jiti@2.4.2: {} + + js-tokens@4.0.0: {} + + jsesc@3.1.0: {} + + json5@2.2.3: {} + + kolorist@1.8.0: {} + + leven@3.1.0: {} + + lit-analyzer@2.0.3: + dependencies: + '@vscode/web-custom-data': 0.4.13 + chalk: 2.4.2 + didyoumean2: 4.1.0 + fast-glob: 3.3.3 + parse5: 5.1.0 + ts-simple-type: 2.0.0-next.0 + vscode-css-languageservice: 4.3.0 + vscode-html-languageservice: 3.1.0 + web-component-analyzer: 2.0.0 + + lit-element@4.1.1: + dependencies: + '@lit-labs/ssr-dom-shim': 1.3.0 + '@lit/reactive-element': 2.0.4 + lit-html: 3.2.1 + + lit-html@3.2.1: + dependencies: + '@types/trusted-types': 2.0.7 + + lit@3.2.1: + dependencies: + '@lit/reactive-element': 2.0.4 + lit-element: 4.1.1 + lit-html: 3.2.1 + + load-tsconfig@0.2.5: {} + + local-pkg@1.0.0: + dependencies: + mlly: 1.7.4 + pkg-types: 1.3.1 + + lodash.deburr@4.1.0: {} + + lru-cache@5.1.1: + dependencies: + yallist: 3.1.1 + + magic-string@0.30.17: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.0 + + mdn-data@2.12.2: {} + + merge2@1.4.1: {} + + micromatch@4.0.8: + dependencies: + braces: 3.0.3 + picomatch: 2.3.1 + + mlly@1.7.4: + dependencies: + acorn: 8.14.0 + pathe: 2.0.2 + pkg-types: 1.3.1 + ufo: 1.5.4 + + mrmime@2.0.0: {} + + ms@2.1.3: {} + + nanoid@3.3.8: {} + + node-fetch-native@1.6.6: {} + + node-releases@2.0.19: {} + + normalize-path@3.0.0: {} + + ofetch@1.4.1: + dependencies: + destr: 2.0.3 + node-fetch-native: 1.6.6 + ufo: 1.5.4 + + package-manager-detector@0.2.9: {} + + parse5@5.1.0: {} + + pathe@1.1.2: {} + + pathe@2.0.2: {} + + perfect-debounce@1.0.0: {} + + picocolors@1.1.1: {} + + picomatch@2.3.1: {} + + picomatch@4.0.2: {} + + pkg-types@1.3.1: + dependencies: + confbox: 0.1.8 + mlly: 1.7.4 + pathe: 2.0.2 + + postcss@8.5.1: + dependencies: + nanoid: 3.3.8 + picocolors: 1.1.1 + source-map-js: 1.2.1 + + queue-microtask@1.2.3: {} + + react-dom@19.0.0(react@19.0.0): + dependencies: + react: 19.0.0 + scheduler: 0.25.0 + + react-refresh@0.14.2: {} + + react@19.0.0: {} + + readdirp@3.6.0: + dependencies: + picomatch: 2.3.1 + + regenerator-runtime@0.14.1: {} + + require-directory@2.1.1: {} + + resolve-pkg-maps@1.0.0: {} + + reusify@1.0.4: {} + + rollup@4.34.4: + dependencies: + '@types/estree': 1.0.6 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.34.4 + '@rollup/rollup-android-arm64': 4.34.4 + '@rollup/rollup-darwin-arm64': 4.34.4 + '@rollup/rollup-darwin-x64': 4.34.4 + '@rollup/rollup-freebsd-arm64': 4.34.4 + '@rollup/rollup-freebsd-x64': 4.34.4 + '@rollup/rollup-linux-arm-gnueabihf': 4.34.4 + '@rollup/rollup-linux-arm-musleabihf': 4.34.4 + '@rollup/rollup-linux-arm64-gnu': 4.34.4 + '@rollup/rollup-linux-arm64-musl': 4.34.4 + '@rollup/rollup-linux-loongarch64-gnu': 4.34.4 + '@rollup/rollup-linux-powerpc64le-gnu': 4.34.4 + '@rollup/rollup-linux-riscv64-gnu': 4.34.4 + '@rollup/rollup-linux-s390x-gnu': 4.34.4 + '@rollup/rollup-linux-x64-gnu': 4.34.4 + '@rollup/rollup-linux-x64-musl': 4.34.4 + '@rollup/rollup-win32-arm64-msvc': 4.34.4 + '@rollup/rollup-win32-ia32-msvc': 4.34.4 + '@rollup/rollup-win32-x64-msvc': 4.34.4 + fsevents: 2.3.3 + + run-parallel@1.2.0: + dependencies: + queue-microtask: 1.2.3 + + scheduler@0.25.0: {} + + semver@6.3.1: {} + + sirv@3.0.0: + dependencies: + '@polka/url': 1.0.0-next.28 + mrmime: 2.0.0 + totalist: 3.0.1 + + source-map-js@1.2.1: {} + + source-map-support@0.5.21: + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + optional: true + + source-map@0.6.1: + optional: true + + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + + supports-color@5.5.0: + dependencies: + has-flag: 3.0.0 + + terser@5.38.0: + dependencies: + '@jridgewell/source-map': 0.3.6 + acorn: 8.14.0 + commander: 2.20.3 + source-map-support: 0.5.21 + optional: true + + tinyexec@0.3.2: {} + + tinyglobby@0.2.10: + dependencies: + fdir: 6.4.3(picomatch@4.0.2) + picomatch: 4.0.2 + + to-regex-range@5.0.1: + dependencies: + is-number: 7.0.0 + + totalist@3.0.1: {} + + ts-lit-plugin@2.0.2: + dependencies: + lit-analyzer: 2.0.3 + web-component-analyzer: 2.0.0 + + ts-simple-type@2.0.0-next.0: {} + + tsx@4.19.2: + dependencies: + esbuild: 0.23.1 + get-tsconfig: 4.10.0 + optionalDependencies: + fsevents: 2.3.3 + + typescript@5.2.2: {} + + typescript@5.7.3: {} + + ufo@1.5.4: {} + + unconfig@0.6.1: + dependencies: + '@antfu/utils': 8.1.0 + defu: 6.1.4 + importx: 0.5.1 + transitivePeerDependencies: + - supports-color + + undici-types@6.20.0: + optional: true + + unocss@65.4.3(@unocss/webpack@65.4.3(rollup@4.34.4))(postcss@8.5.1)(rollup@4.34.4)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.7.3)): + dependencies: + '@unocss/astro': 65.4.3(rollup@4.34.4)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.7.3)) + '@unocss/cli': 65.4.3(rollup@4.34.4) + '@unocss/core': 65.4.3 + '@unocss/postcss': 65.4.3(postcss@8.5.1) + '@unocss/preset-attributify': 65.4.3 + '@unocss/preset-icons': 65.4.3 + '@unocss/preset-mini': 65.4.3 + '@unocss/preset-tagify': 65.4.3 + '@unocss/preset-typography': 65.4.3 + '@unocss/preset-uno': 65.4.3 + '@unocss/preset-web-fonts': 65.4.3 + '@unocss/preset-wind': 65.4.3 + '@unocss/transformer-attributify-jsx': 65.4.3 + '@unocss/transformer-compile-class': 65.4.3 + '@unocss/transformer-directives': 65.4.3 + '@unocss/transformer-variant-group': 65.4.3 + '@unocss/vite': 65.4.3(rollup@4.34.4)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.7.3)) + optionalDependencies: + '@unocss/webpack': 65.4.3(rollup@4.34.4) + vite: 6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2) + transitivePeerDependencies: + - postcss + - rollup + - supports-color + - vue + + unplugin@2.1.2: + dependencies: + acorn: 8.14.0 + webpack-virtual-modules: 0.6.2 + optional: true + + update-browserslist-db@1.1.2(browserslist@4.24.4): + dependencies: + browserslist: 4.24.4 + escalade: 3.2.0 + picocolors: 1.1.1 + + vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2): + dependencies: + esbuild: 0.24.2 + postcss: 8.5.1 + rollup: 4.34.4 + optionalDependencies: + '@types/node': 22.13.1 + fsevents: 2.3.3 + jiti: 2.4.2 + terser: 5.38.0 + tsx: 4.19.2 + + vscode-css-languageservice@4.3.0: + dependencies: + vscode-languageserver-textdocument: 1.0.12 + vscode-languageserver-types: 3.16.0-next.2 + vscode-nls: 4.1.2 + vscode-uri: 2.1.2 + + vscode-html-languageservice@3.1.0: + dependencies: + vscode-languageserver-textdocument: 1.0.12 + vscode-languageserver-types: 3.16.0-next.2 + vscode-nls: 4.1.2 + vscode-uri: 2.1.2 + + vscode-languageserver-textdocument@1.0.12: {} + + vscode-languageserver-types@3.16.0-next.2: {} + + vscode-nls@4.1.2: {} + + vscode-uri@2.1.2: {} + + vue-flow-layout@0.1.1(vue@3.5.13(typescript@5.7.3)): + dependencies: + vue: 3.5.13(typescript@5.7.3) + + vue@3.5.13(typescript@5.7.3): + dependencies: + '@vue/compiler-dom': 3.5.13 + '@vue/compiler-sfc': 3.5.13 + '@vue/runtime-dom': 3.5.13 + '@vue/server-renderer': 3.5.13(vue@3.5.13(typescript@5.7.3)) + '@vue/shared': 3.5.13 + optionalDependencies: + typescript: 5.7.3 + + web-component-analyzer@2.0.0: + dependencies: + fast-glob: 3.3.3 + ts-simple-type: 2.0.0-next.0 + typescript: 5.2.2 + yargs: 17.7.2 + + webpack-sources@3.2.3: + optional: true + + webpack-virtual-modules@0.6.2: + optional: true + + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + y18n@5.0.8: {} + + yallist@3.1.1: {} + + yargs-parser@21.1.1: {} + + yargs@17.7.2: + dependencies: + cliui: 8.0.1 + escalade: 3.2.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 0000000..eccc335 --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1,2 @@ +packages: + - 'packages/**' \ No newline at end of file diff --git a/src/main/java/run/halo/live2d/Live2dInitProcessor.java b/src/main/java/run/halo/live2d/Live2dInitProcessor.java index 8c599b9..4c2eb1a 100644 --- a/src/main/java/run/halo/live2d/Live2dInitProcessor.java +++ b/src/main/java/run/halo/live2d/Live2dInitProcessor.java @@ -107,9 +107,9 @@ private CharSequence loadLive2d(String loadTime, String loadingScript) { """; } else { template = """ - window.onload = function() { + window.addEventListener('load', () => { %s - } + }) """; } return template.formatted(loadingScript); From b9351edc72477169a72a785acfa7913f8307e98c Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Thu, 6 Feb 2025 18:43:12 +0800 Subject: [PATCH 03/12] feat: enhance toggle functionality --- packages/live2d/src/components/Live2dToggle.tsx | 2 +- packages/live2d/uno.config.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/live2d/src/components/Live2dToggle.tsx b/packages/live2d/src/components/Live2dToggle.tsx index f03785e..3394500 100644 --- a/packages/live2d/src/components/Live2dToggle.tsx +++ b/packages/live2d/src/components/Live2dToggle.tsx @@ -23,7 +23,7 @@ export class Live2dToggle extends UnoLitElement { } render(): TemplateResult { - return html`
+ return html`
看板娘
`; } diff --git a/packages/live2d/uno.config.ts b/packages/live2d/uno.config.ts index 48d1df6..0127cd9 100644 --- a/packages/live2d/uno.config.ts +++ b/packages/live2d/uno.config.ts @@ -6,4 +6,9 @@ export default defineConfig({ }, presets: [presetUno()], transformers: [transformerDirectives()], + rules: [ + ['writing-vertical-rl', { + "writing-mode": "vertical-rl" + }] + ] }); \ No newline at end of file From 87ecb6ecb18ab3975b1aa7985369edf6301ed58f Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Fri, 7 Feb 2025 01:10:57 +0800 Subject: [PATCH 04/12] feat: add live2d context --- packages/live2d/.editorconfig | 11 +++ packages/live2d/package.json | 21 ++-- packages/live2d/src/Demo.tsx | 20 ++-- .../live2d/src/components/Live2dCanvas.tsx | 30 ++++-- .../live2d/src/components/Live2dContext.tsx | 31 ++++++ .../live2d/src/components/Live2dToggle.tsx | 99 ++++++++++--------- .../live2d/src/components/Live2dWidget.tsx | 38 +++++-- packages/live2d/src/context/config-context.ts | 15 +++ packages/live2d/src/index.ts | 6 +- packages/live2d/src/live2d/model.ts | 4 +- packages/live2d/src/types/index.ts | 13 +-- 11 files changed, 196 insertions(+), 92 deletions(-) create mode 100644 packages/live2d/.editorconfig create mode 100644 packages/live2d/src/components/Live2dContext.tsx create mode 100644 packages/live2d/src/context/config-context.ts diff --git a/packages/live2d/.editorconfig b/packages/live2d/.editorconfig new file mode 100644 index 0000000..3c2d313 --- /dev/null +++ b/packages/live2d/.editorconfig @@ -0,0 +1,11 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = false \ No newline at end of file diff --git a/packages/live2d/package.json b/packages/live2d/package.json index 731f2a3..b3af2c0 100644 --- a/packages/live2d/package.json +++ b/packages/live2d/package.json @@ -3,21 +3,24 @@ "private": true, "version": "1.0.0", "type": "module", - "files": ["dist"], + "files": [ + "dist" + ], "main": "./dist/live2d.umd.cjs", - "module": "./dist/live2d.js", - "exports": { - ".": { - "import": "./dist/live2d.js", - "require": "./dist/live2d.umd.cjs" - } - }, + "module": "./dist/live2d.js", + "exports": { + ".": { + "import": "./dist/live2d.js", + "require": "./dist/live2d.umd.cjs" + } + }, "scripts": { - "dev": "vite --open", + "dev": "vite --open", "build": "tsc -b && vite build", "check": "biome check --write" }, "dependencies": { + "@lit/context": "^1.1.3", "@lit/react": "^1.0.7", "lit": "^3.2.1", "react": "^19.0.0", diff --git a/packages/live2d/src/Demo.tsx b/packages/live2d/src/Demo.tsx index 989f480..3ba19a6 100644 --- a/packages/live2d/src/Demo.tsx +++ b/packages/live2d/src/Demo.tsx @@ -1,13 +1,13 @@ -import React from 'react'; -import ReactDOM from 'react-dom/client'; -import { Live2dToggleComponent } from './components/Live2dToggle'; +import React from "react"; +import ReactDOM from "react-dom/client"; +import { Live2dContextComponent } from "./components/Live2dContext"; -const rootEl = document.getElementById('root'); +const rootEl = document.getElementById("root"); if (rootEl) { - const root = ReactDOM.createRoot(rootEl); - root.render( - - - , - ); + const root = ReactDOM.createRoot(rootEl); + root.render( + + + , + ); } diff --git a/packages/live2d/src/components/Live2dCanvas.tsx b/packages/live2d/src/components/Live2dCanvas.tsx index 8b86854..912e93e 100644 --- a/packages/live2d/src/components/Live2dCanvas.tsx +++ b/packages/live2d/src/components/Live2dCanvas.tsx @@ -2,21 +2,37 @@ import { html, type TemplateResult } from "lit"; import { UnoLitElement } from "../common/UnoLitElement"; import { createComponent } from "@lit/react"; import React from "react"; +import { property, state } from "lit/decorators.js"; +import Model from "../live2d/model"; +import { consume } from "@lit/context"; +import { configContext, type Live2dConfig } from "../context/config-context"; export class Live2dCanvas extends UnoLitElement { - render(): TemplateResult { - return html` + @consume({ context: configContext }) + @property({ attribute: false }) + public config?: Live2dConfig; + + @state() + private _model: unknown; + + connectedCallback(): void { + super.connectedCallback(); + this._model = new Model(this.config); + } + + render(): TemplateResult { + return html`
`; - } + } } customElements.define("live2d-canvas", Live2dCanvas); export const Live2dCanvasComponent = createComponent({ - tagName: "live2d-canvas", - elementClass: Live2dCanvas, - react: React, -}) \ No newline at end of file + tagName: "live2d-canvas", + elementClass: Live2dCanvas, + react: React, +}); diff --git a/packages/live2d/src/components/Live2dContext.tsx b/packages/live2d/src/components/Live2dContext.tsx new file mode 100644 index 0000000..582c911 --- /dev/null +++ b/packages/live2d/src/components/Live2dContext.tsx @@ -0,0 +1,31 @@ +import { html, type TemplateResult } from "lit"; +import { UnoLitElement } from "../common/UnoLitElement"; +import { createComponent } from "@lit/react"; +import React from "react"; +import "./Live2dWidget"; +import { provide } from "@lit/context"; +import { configContext, type Live2dConfig } from "../context/config-context"; + +export class Live2dContext extends UnoLitElement { + @provide({ context: configContext }) + logger = { + apiPath: "https://live2d.fghrsh.net/api", + live2dLocation: "right", + consoleShowStatus: false, + isTools: true, + } as Live2dConfig; + + render(): TemplateResult { + return html` + + `; + } +} + +customElements.define("live2d-context", Live2dContext); + +export const Live2dContextComponent = createComponent({ + tagName: "live2d-context", + elementClass: Live2dContext, + react: React, +}); diff --git a/packages/live2d/src/components/Live2dToggle.tsx b/packages/live2d/src/components/Live2dToggle.tsx index 3394500..4885e51 100644 --- a/packages/live2d/src/components/Live2dToggle.tsx +++ b/packages/live2d/src/components/Live2dToggle.tsx @@ -4,56 +4,67 @@ import { createComponent } from "@lit/react"; import React from "react"; import { TOGGLE_CANVAS_EVENT } from "../events"; import { state } from "lit/decorators.js"; +import type { Live2dToggleEventDetail } from "../types"; export class Live2dToggle extends UnoLitElement { - @state() - // 当前工具栏是否显示 - private _isShow = false; - - constructor() { - super(); - this.addEventListener("click", this.handleClick); - // 初始化时,判断是否已经隐藏看板娘超过一天,如果是,则显示看板娘。否则,继续隐藏看板娘。 - const live2dDisplay = localStorage.getItem("live2d-display") - if (live2dDisplay) { - if (Date.now() - Number.parseInt(live2dDisplay) > 24 * 60 * 60 * 1000) { - this.triggerToggleLive2d(true); - } - } - } - - render(): TemplateResult { - return html`
+ @state() + // 当前工具栏是否显示 + private _isShow = false; + + connectedCallback(): void { + super.connectedCallback(); + this.addEventListener("click", this.handleClick); + + // 初始化时,判断是否已经隐藏看板娘超过一天,如果是,则显示看板娘。否则,继续隐藏看板娘。 + const live2dDisplay = localStorage.getItem("live2d-display"); + if (live2dDisplay) { + if (Date.now() - Number.parseInt(live2dDisplay) <= 24 * 60 * 60 * 1000) { + this.triggerToggleLive2d(false); + return; + } + } + this.triggerToggleLive2d(true); + } + + disconnectedCallback(): void { + super.disconnectedCallback(); + this.removeEventListener("click", this.handleClick); + } + + render(): TemplateResult { + return html`
看板娘
`; - } - - handleClick() { - this.triggerToggleLive2d(!!this._isShow); - } - - triggerToggleLive2d(isShow: boolean) { - // 当前切换栏与 Live2d 的显示状态相反 - this._isShow = !isShow; - if (isShow) { - localStorage.removeItem("live2d-display"); - } else { - localStorage.setItem("live2d-display", Date.now().toString()); - } - this.dispatchEvent(new CustomEvent(TOGGLE_CANVAS_EVENT, { - bubbles: true, - composed: true, - detail: { - isShow, - }, - })); - } + } + + handleClick() { + this.triggerToggleLive2d(!!this._isShow); + } + + triggerToggleLive2d(isShow: boolean) { + // 当前切换栏与 Live2d 的显示状态相反 + this._isShow = !isShow; + if (isShow) { + localStorage.removeItem("live2d-display"); + } else { + localStorage.setItem("live2d-display", Date.now().toString()); + } + this.dispatchEvent( + new CustomEvent(TOGGLE_CANVAS_EVENT, { + bubbles: true, + composed: true, + detail: { + isShow, + }, + }), + ); + } } customElements.define("live2d-toggle", Live2dToggle); export const Live2dToggleComponent = createComponent({ - tagName: "live2d-toggle", - elementClass: Live2dToggle, - react: React, -}) \ No newline at end of file + tagName: "live2d-toggle", + elementClass: Live2dToggle, + react: React, +}); diff --git a/packages/live2d/src/components/Live2dWidget.tsx b/packages/live2d/src/components/Live2dWidget.tsx index 196338c..bb3cd74 100644 --- a/packages/live2d/src/components/Live2dWidget.tsx +++ b/packages/live2d/src/components/Live2dWidget.tsx @@ -2,22 +2,40 @@ import { html, type TemplateResult } from "lit"; import { UnoLitElement } from "../common/UnoLitElement"; import { createComponent } from "@lit/react"; import React from "react"; +import type { Live2dToggleEventDetail } from "../types"; import { state } from "lit/decorators.js"; +import "./Live2dToggle"; +import "./Live2dCanvas"; + export class Live2dWidget extends UnoLitElement { - render(): TemplateResult { - return html` -
- -
+ @state() + private _isShow = false; + + render(): TemplateResult { + return html` + + ${this.renderLive2dWidget()} `; - } + } + + renderLive2dWidget() { + if (this._isShow) { + return html`
+ +
`; + } + } + + handleToggleWidget(e: CustomEvent) { + this._isShow = e.detail.isShow; + } } customElements.define("live2d-widget", Live2dWidget); export const Live2dWidgetComponent = createComponent({ - tagName: "live2d-widget", - elementClass: Live2dWidget, - react: React, -}) \ No newline at end of file + tagName: "live2d-widget", + elementClass: Live2dWidget, + react: React, +}); diff --git a/packages/live2d/src/context/config-context.ts b/packages/live2d/src/context/config-context.ts new file mode 100644 index 0000000..867bf09 --- /dev/null +++ b/packages/live2d/src/context/config-context.ts @@ -0,0 +1,15 @@ +import { createContext } from '@lit/context'; + +export interface Live2dConfig { + // Live2d API 路径 + apiPath: string; + // Live2d 定位 + live2dLocation: "left" | "right"; + // 是否在控制台显示状态 + consoleShowStatus?: boolean; + // 是否显示右侧工具栏 + isTools?: boolean; + [key: string]: unknown; +} + +export const configContext = createContext("config"); \ No newline at end of file diff --git a/packages/live2d/src/index.ts b/packages/live2d/src/index.ts index 5e2d630..615b6eb 100644 --- a/packages/live2d/src/index.ts +++ b/packages/live2d/src/index.ts @@ -1,5 +1,9 @@ import { Live2dToggle } from "./components/Live2dToggle" +import { Live2dWidget } from "./components/Live2dWidget" +import { Live2dContext } from './components/Live2dContext'; export { - Live2dToggle + Live2dToggle, + Live2dWidget, + Live2dContext, } \ No newline at end of file diff --git a/packages/live2d/src/live2d/model.ts b/packages/live2d/src/live2d/model.ts index b595e81..c6546ef 100644 --- a/packages/live2d/src/live2d/model.ts +++ b/packages/live2d/src/live2d/model.ts @@ -78,4 +78,6 @@ class Model { .then((response) => response.json()) as ModelResult; this.loadModel(result.model.id, 0, result.model.message); } -} \ No newline at end of file +} + +export default Model; \ No newline at end of file diff --git a/packages/live2d/src/types/index.ts b/packages/live2d/src/types/index.ts index 311ce63..55345db 100644 --- a/packages/live2d/src/types/index.ts +++ b/packages/live2d/src/types/index.ts @@ -1,13 +1,6 @@ -export interface Live2dConfig { - // Live2d API 路径 - apiPath: string; - // Live2d 定位 - live2dLocation: "left" | "right"; - // 是否在控制台显示状态 - consoleShowStatus?: boolean; - // 是否显示右侧工具栏 - isTools?: boolean; - [key: string]: unknown; +export interface Live2dToggleEventDetail { + // 是否显示看板娘 + isShow: boolean; } export interface Live2dMessageEventDetail { From 3052a28e34c2a83e5c59e7e87916650941bca119 Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Tue, 11 Feb 2025 01:26:14 +0800 Subject: [PATCH 05/12] refactor: complete refactoring of tips and related content --- .../live2d/src/components/Live2dCanvas.tsx | 35 +- .../live2d/src/components/Live2dContext.tsx | 1 + packages/live2d/src/components/Live2dTips.tsx | 47 +- .../live2d/src/components/Live2dToggle.tsx | 3 +- .../live2d/src/components/Live2dWidget.tsx | 6 +- packages/live2d/src/context/config-context.ts | 45 + packages/live2d/src/events/event.d.ts | 8 + packages/live2d/src/events/index.ts | 4 +- packages/live2d/src/events/load-tips.ts | 46 + packages/live2d/src/events/types.ts | 27 + packages/live2d/src/helpers/getPluginTips.ts | 52 + .../live2d/src/helpers/loadTipsResource.ts | 35 + packages/live2d/src/helpers/mergeTips.ts | 31 + .../live2d/src/helpers/pluginTipsCovert.ts | 29 + packages/live2d/src/helpers/sendMessage.ts | 2 +- packages/live2d/src/libs/live2d-tips.json | 412 + packages/live2d/src/libs/live2d.min.js | 8121 +++++++++++++++++ packages/live2d/src/live2d/model.ts | 31 +- packages/live2d/src/types/index.ts | 13 - packages/live2d/src/util/distinctArray.ts | 7 + pnpm-lock.yaml | 10 + 21 files changed, 8921 insertions(+), 44 deletions(-) create mode 100644 packages/live2d/src/events/event.d.ts create mode 100644 packages/live2d/src/events/load-tips.ts create mode 100644 packages/live2d/src/events/types.ts create mode 100644 packages/live2d/src/helpers/getPluginTips.ts create mode 100644 packages/live2d/src/helpers/loadTipsResource.ts create mode 100644 packages/live2d/src/helpers/mergeTips.ts create mode 100644 packages/live2d/src/helpers/pluginTipsCovert.ts create mode 100644 packages/live2d/src/libs/live2d-tips.json create mode 100644 packages/live2d/src/libs/live2d.min.js delete mode 100644 packages/live2d/src/types/index.ts create mode 100644 packages/live2d/src/util/distinctArray.ts diff --git a/packages/live2d/src/components/Live2dCanvas.tsx b/packages/live2d/src/components/Live2dCanvas.tsx index 912e93e..fdd32fb 100644 --- a/packages/live2d/src/components/Live2dCanvas.tsx +++ b/packages/live2d/src/components/Live2dCanvas.tsx @@ -1,11 +1,13 @@ -import { html, type TemplateResult } from "lit"; +import { html, type PropertyValues, type TemplateResult } from "lit"; import { UnoLitElement } from "../common/UnoLitElement"; import { createComponent } from "@lit/react"; import React from "react"; -import { property, state } from "lit/decorators.js"; +import { property, query, state } from "lit/decorators.js"; import Model from "../live2d/model"; import { consume } from "@lit/context"; import { configContext, type Live2dConfig } from "../context/config-context"; +import "../libs/live2d.min.js"; +import { LIVE2D_BEFORE_INIT_EVENT } from "../events/types.js"; export class Live2dCanvas extends UnoLitElement { @consume({ context: configContext }) @@ -15,18 +17,35 @@ export class Live2dCanvas extends UnoLitElement { @state() private _model: unknown; - connectedCallback(): void { - super.connectedCallback(); - this._model = new Model(this.config); - } + @query("#live2d") + private _live2d; render(): TemplateResult { return html` -
+ -
+ `; } + + connectedCallback(): void { + super.connectedCallback(); + // 发出 Live2d beforeInit 事件 + window.dispatchEvent( + new CustomEvent(LIVE2D_BEFORE_INIT_EVENT, { + detail: { + config: this.config, + }, + }), + ); + } + + protected firstUpdated(_changedProperties: PropertyValues): void { + super.firstUpdated(_changedProperties); + if (this.config && this._live2d) { + this._model = new Model(this._live2d, this.config); + } + } } customElements.define("live2d-canvas", Live2dCanvas); diff --git a/packages/live2d/src/components/Live2dContext.tsx b/packages/live2d/src/components/Live2dContext.tsx index 582c911..651e769 100644 --- a/packages/live2d/src/components/Live2dContext.tsx +++ b/packages/live2d/src/components/Live2dContext.tsx @@ -5,6 +5,7 @@ import React from "react"; import "./Live2dWidget"; import { provide } from "@lit/context"; import { configContext, type Live2dConfig } from "../context/config-context"; +import "../events"; export class Live2dContext extends UnoLitElement { @provide({ context: configContext }) diff --git a/packages/live2d/src/components/Live2dTips.tsx b/packages/live2d/src/components/Live2dTips.tsx index 6dc8fb2..4e945db 100644 --- a/packages/live2d/src/components/Live2dTips.tsx +++ b/packages/live2d/src/components/Live2dTips.tsx @@ -2,21 +2,54 @@ import { html, type TemplateResult } from "lit"; import { UnoLitElement } from "../common/UnoLitElement"; import { createComponent } from "@lit/react"; import React from "react"; +import { + LIVE2d_MESSAGE_EVENT, + type Live2dMessageEventDetail, +} from "../events/types"; +import { consume } from "@lit/context"; +import { configContext, type Live2dConfig } from "../context/config-context"; +import { property } from "lit/decorators.js"; export class Live2dTips extends UnoLitElement { - render(): TemplateResult { - return html` + @consume({ context: configContext }) + @property({ attribute: false }) + public config?: Live2dConfig; + + render(): TemplateResult { + return html`
`; - } + } + + connectedCallback(): void { + super.connectedCallback(); + // 为 tips 注册 tips 相关事件 + window.addEventListener( + LIVE2d_MESSAGE_EVENT, + this.handleMessage as EventListener, + ); + } + + disconnectedCallback(): void { + super.connectedCallback(); + window.removeEventListener( + LIVE2d_MESSAGE_EVENT, + this.handleMessage as EventListener, + ); + } + + handleMessage(e: CustomEvent) { + console.log(e.detail); + return; + } } customElements.define("live2d-tips", Live2dTips); export const Live2dTipsComponent = createComponent({ - tagName: "live2d-tips", - elementClass: Live2dTips, - react: React, -}) \ No newline at end of file + tagName: "live2d-tips", + elementClass: Live2dTips, + react: React, +}); diff --git a/packages/live2d/src/components/Live2dToggle.tsx b/packages/live2d/src/components/Live2dToggle.tsx index 4885e51..8a5f007 100644 --- a/packages/live2d/src/components/Live2dToggle.tsx +++ b/packages/live2d/src/components/Live2dToggle.tsx @@ -2,9 +2,8 @@ import { html, type TemplateResult } from "lit"; import { UnoLitElement } from "../common/UnoLitElement"; import { createComponent } from "@lit/react"; import React from "react"; -import { TOGGLE_CANVAS_EVENT } from "../events"; +import { type Live2dToggleEventDetail, TOGGLE_CANVAS_EVENT } from "../events/types"; import { state } from "lit/decorators.js"; -import type { Live2dToggleEventDetail } from "../types"; export class Live2dToggle extends UnoLitElement { @state() diff --git a/packages/live2d/src/components/Live2dWidget.tsx b/packages/live2d/src/components/Live2dWidget.tsx index bb3cd74..c71c272 100644 --- a/packages/live2d/src/components/Live2dWidget.tsx +++ b/packages/live2d/src/components/Live2dWidget.tsx @@ -2,11 +2,12 @@ import { html, type TemplateResult } from "lit"; import { UnoLitElement } from "../common/UnoLitElement"; import { createComponent } from "@lit/react"; import React from "react"; -import type { Live2dToggleEventDetail } from "../types"; import { state } from "lit/decorators.js"; import "./Live2dToggle"; +import "./Live2dTips"; import "./Live2dCanvas"; +import type { Live2dToggleEventDetail } from "../events/types"; export class Live2dWidget extends UnoLitElement { @state() @@ -14,7 +15,7 @@ export class Live2dWidget extends UnoLitElement { render(): TemplateResult { return html` - + ${this.renderLive2dWidget()} `; } @@ -22,6 +23,7 @@ export class Live2dWidget extends UnoLitElement { renderLive2dWidget() { if (this._isShow) { return html`
+
`; } diff --git a/packages/live2d/src/context/config-context.ts b/packages/live2d/src/context/config-context.ts index 867bf09..915e1c4 100644 --- a/packages/live2d/src/context/config-context.ts +++ b/packages/live2d/src/context/config-context.ts @@ -1,5 +1,26 @@ import { createContext } from '@lit/context'; +export interface TipConfig { + mouseover: { + selector: string; + text: string[] | string; + }[]; + click: { + selector: string; + text: string[] | string; + }[]; + seasons: { + date: string; + text: string[] | string; + }[]; + message: { + default?: string[] | string; + console?: string[] | string; + copy?: string[] | string; + visibilitychange?: string[] | string; + } +} + export interface Live2dConfig { // Live2d API 路径 apiPath: string; @@ -9,6 +30,30 @@ export interface Live2dConfig { consoleShowStatus?: boolean; // 是否显示右侧工具栏 isTools?: boolean; + // 是否强制使用默认配置 + isForceUseDefaultConfig?: boolean; + // 模型编号 + modelId?: number; + // 纹理编号 + modelTexturesId?: number; + // 主题下的 tips 文件路径 + themeTipsPath?: string; + // 用户自定义的 tips 文件路径 + tipsPath?: string; + // 用户使用插件定义的 tips + selectorTips?: [{ + messageTexts?: { + message: string; + }[]; + selector: string; + mouseAction: "click" | "mouseover" | string | undefined; + }]; + // 页面可见性变化时的 tips + backSiteTip: string[] | string; + // 复制内容时的 tips + copyContentTip: string[] | string; + // 控制台打印 tips + openConsoleTip: string[] | string; [key: string]: unknown; } diff --git a/packages/live2d/src/events/event.d.ts b/packages/live2d/src/events/event.d.ts new file mode 100644 index 0000000..dbb1ea5 --- /dev/null +++ b/packages/live2d/src/events/event.d.ts @@ -0,0 +1,8 @@ +// 扩展全局事件映射 +interface GlobalEventHandlersEventMap { + "live2d:before-init": CustomEvent; + + "live2d:toggle-canvas": CustomEvent; + + "live2d:send-message": CustomEvent; +} \ No newline at end of file diff --git a/packages/live2d/src/events/index.ts b/packages/live2d/src/events/index.ts index 89687bf..73f237c 100644 --- a/packages/live2d/src/events/index.ts +++ b/packages/live2d/src/events/index.ts @@ -1,3 +1 @@ -export const TOGGLE_CANVAS_EVENT = 'toggle-canvas'; - -export const LIVE2d_MESSAGE_EVENT = 'live2d-message'; \ No newline at end of file +import "./load-tips"; \ No newline at end of file diff --git a/packages/live2d/src/events/load-tips.ts b/packages/live2d/src/events/load-tips.ts new file mode 100644 index 0000000..aed124a --- /dev/null +++ b/packages/live2d/src/events/load-tips.ts @@ -0,0 +1,46 @@ +import type { Live2dConfig, TipConfig } from "../context/config-context"; +import { getPluginTips } from "../helpers/getPluginTips"; +import { loadTipsResource } from "../helpers/loadTipsResource"; +import { mergeTips } from "../helpers/mergeTips"; +import { isNotEmptyString } from "../util/isString"; + +window.addEventListener("live2d:before-init", async (e) => { + const config = e.detail.config; + const tips = await _loadTips(config); + console.log("tips", tips); +}) + +const _loadTips = async (config: Live2dConfig) => { + if (!config) { + return; + } + // 后台配置 tips,其中包含 mouseover 及 click 两种配置,以及单独配置的 message + const pluginTips = getPluginTips(config); + // 主题设置 tips,只会包含 mouseover 及 click 两种配置(会过滤掉其他配置) + const themeTipsResult = await loadTipsResource(config.themeTipsPath); + const themeTips: TipConfig = { + click: themeTipsResult?.click || [], + mouseover: themeTipsResult?.mouseover || [], + seasons: [], + message: {}, + }; + const fullOrDefaultTips = await _getFullOrDefaultTips(config); + // 合并三种 tips + return mergeTips({ + pluginTips, + themeTips, + fullOrDefaultTips, + }); +} + +export const _getFullOrDefaultTips = async (config: Live2dConfig): Promise => { + // 获取插件文件中的全量 tips 文件 + if (isNotEmptyString(config?.tipsPath)) { + const tipsResult = await loadTipsResource(config.tipsPath); + if (tipsResult) { + return tipsResult; + } + } + // 获取默认的 tips 文件 + return (await import("../libs/live2d-tips.json")).default; +} diff --git a/packages/live2d/src/events/types.ts b/packages/live2d/src/events/types.ts new file mode 100644 index 0000000..1658fd1 --- /dev/null +++ b/packages/live2d/src/events/types.ts @@ -0,0 +1,27 @@ +import type { Live2dConfig } from "../context/config-context"; + +// Live2d beforeInit 事件 +export const LIVE2D_BEFORE_INIT_EVENT = 'live2d:before-init'; +export type Live2dBeforeInitEventDetail = { + // Live2D 配置 + config: Live2dConfig +} + + +// 切换 canvas 显示状态事件 +export const TOGGLE_CANVAS_EVENT = 'live2d:toggle-canvas'; +export type Live2dToggleEventDetail = { + // 是否显示看板娘 + isShow: boolean; +} + +// 发送 Live2D 消息事件 +export const LIVE2d_MESSAGE_EVENT = 'live2d:send-message'; +export type Live2dMessageEventDetail = { + // 消息内容 + text: string; + // 消息显示时间 + timeout: number; + // 消息优先级 + priority: number; +} diff --git a/packages/live2d/src/helpers/getPluginTips.ts b/packages/live2d/src/helpers/getPluginTips.ts new file mode 100644 index 0000000..423e61b --- /dev/null +++ b/packages/live2d/src/helpers/getPluginTips.ts @@ -0,0 +1,52 @@ +import type { Live2dConfig, TipConfig } from "../context/config-context"; + +/** + * 整合插件配置中的 tips 元素。 + * + * 插件配置中的元素如下所示: + * "selectorTips" : [ { + * "mouseAction" : "mouseover", + * "selector" : "#select", + * "messageTexts" : [ { + * "message" : "123" + * }, { + * "message" : "1231" + * }] + * }], + * "copyContentTip" : "你都复制了些什么呀,转载要记得加上出处哦!", + * "openConsoleTip" : "你是想要看看我的小秘密吗?", + */ +export const getPluginTips = (config: Live2dConfig): TipConfig => { + const tips: TipConfig = { + seasons: [], + click: [], + mouseover: [], + message: {}, + }; + // selector + if (config.selectorTips) { + for (const item of config.selectorTips) { + const texts = item.messageTexts?.map((text) => text.message); + if (!texts) { + continue; + } + const obj = { + selector: item.selector, + text: texts, + }; + if (item.mouseAction === "click") { + tips.click?.push(obj); + } else { + tips.mouseover?.push(obj); + } + } + } + // message + if (tips.message) { + tips.message.visibilitychange = config.backSiteTip; + tips.message.copy = config.copyContentTip; + tips.message.console = config.openConsoleTip; + } + + return tips; +} \ No newline at end of file diff --git a/packages/live2d/src/helpers/loadTipsResource.ts b/packages/live2d/src/helpers/loadTipsResource.ts new file mode 100644 index 0000000..e0fa4af --- /dev/null +++ b/packages/live2d/src/helpers/loadTipsResource.ts @@ -0,0 +1,35 @@ +import type { TipConfig } from '../context/config-context'; + +/** + * 远程加载提示资源 + * + * @param url + * @returns + */ +export function loadTipsResource(url?: string) { + const defaultObj: TipConfig = { + mouseover: [], + click: [], + seasons: [], + message: {}, + }; + return new Promise((resolve) => { + if (!url) { + resolve(defaultObj); + return; + } + try { + fetch(url) + .then((response) => response.json()) + .then((result) => { + resolve(result); + }) + .catch(() => { + resolve(defaultObj); + }); + } catch (e) { + // ignore + } + }); +}; \ No newline at end of file diff --git a/packages/live2d/src/helpers/mergeTips.ts b/packages/live2d/src/helpers/mergeTips.ts new file mode 100644 index 0000000..3a4eb0e --- /dev/null +++ b/packages/live2d/src/helpers/mergeTips.ts @@ -0,0 +1,31 @@ +import type { TipConfig } from "../context/config-context"; +import { distinctArray } from "../util/distinctArray"; + +/** + * 合并各个渠道的 tips,根据获取位置不同,合并时优先级也不同。优先级按高到低的顺序为 + * + *
    + *
      后台插件配置文件中获得的 tips。(该配置文件只支持 mouseover 与 click 两种类型的 tips 属性,另外包括单独配置的 message)
    + *
      主题文件中设置的 tips (该配置文件只支持 mouseover 与 click 两种类型的 tips 属性)
    + *
      配置/默认的 tips 文件(该配置文件支持所有的 tips 属性,但其属性会被优先级高的覆盖)
    + *
+ * + * 请注意,此项返回值为修改后的 defaultTips,任何修改 defaultTips 的情况都将导致返回值同步修改。 + * + * @param pluginTips 后台配置文件中设置的 tips + * @param themeTips 主题提供的 tips + * @param defaultTips 配置/默认的 tips + */ +export const mergeTips = ({ pluginTips, themeTips, fullOrDefaultTips }: { + pluginTips: TipConfig; + themeTips: TipConfig; + fullOrDefaultTips: TipConfig; +}) => { + const defaultTips = { ...fullOrDefaultTips }; + const duplicateClick = [...pluginTips.click, ...themeTips.click, ...fullOrDefaultTips.click]; + const duplicateMouseover = [...pluginTips.mouseover, ...themeTips.mouseover, ...fullOrDefaultTips.mouseover]; + defaultTips.click = distinctArray(duplicateClick, "selector"); + defaultTips.mouseover = distinctArray(duplicateMouseover, "selector"); + defaultTips.message = { ...defaultTips.message, ...pluginTips.message }; + return defaultTips; +}; \ No newline at end of file diff --git a/packages/live2d/src/helpers/pluginTipsCovert.ts b/packages/live2d/src/helpers/pluginTipsCovert.ts new file mode 100644 index 0000000..ea50cfd --- /dev/null +++ b/packages/live2d/src/helpers/pluginTipsCovert.ts @@ -0,0 +1,29 @@ +import type { Live2dConfig } from "../context/config-context"; + +export function backendConfigConvert(config: Live2dConfig) { + const tips = { + click: [], + mouseover: [], + message: {}, + }; + // selector + if (!!config["selectorTips"]) { + config["selectorTips"].forEach((item) => { + let texts = item["messageTexts"].map((text) => text.message); + let obj = { + selector: item["selector"], + text: texts, + }; + if (item["mouseAction"] === "click") { + tips.click.push(obj); + } else { + tips.mouseover.push(obj); + } + }); + } + // message + tips.message.visibilitychange = config["backSiteTip"]; + tips.message.copy = config["copyContentTip"]; + tips.message.console = config["openConsoleTip"]; + return tips; +}; \ No newline at end of file diff --git a/packages/live2d/src/helpers/sendMessage.ts b/packages/live2d/src/helpers/sendMessage.ts index 38e8069..3ce33ec 100644 --- a/packages/live2d/src/helpers/sendMessage.ts +++ b/packages/live2d/src/helpers/sendMessage.ts @@ -1,4 +1,4 @@ -import { LIVE2d_MESSAGE_EVENT } from "../events"; +import { LIVE2d_MESSAGE_EVENT } from "../events/types"; /** * 向 Live2D 发送消息事件 diff --git a/packages/live2d/src/libs/live2d-tips.json b/packages/live2d/src/libs/live2d-tips.json new file mode 100644 index 0000000..1846253 --- /dev/null +++ b/packages/live2d/src/libs/live2d-tips.json @@ -0,0 +1,412 @@ +{ + "mouseover": [ + { + "selector": "#live2d", + "text": [ + "干嘛呢你,快把手拿开~~", + "鼠…鼠标放错地方了!", + "你要干嘛呀?", + "喵喵喵?", + "怕怕(ノ≧∇≦)ノ", + "非礼呀!救命!", + "这样的话,只能使用武力了!", + "我要生气了哦", + "不要动手动脚的!", + "真…真的是不知羞耻!", + "Hentai!" + ] + }, + { + "selector": "#live2d-tool-openai", + "text": [ + "想要和我聊天吗?", + "我可是知道不少东西的!", + "呐呐,来和我聊聊天嘛~" + ] + }, + { + "selector": "#live2d-tool-hitokoto", + "text": ["猜猜我要说些什么?", "我从青蛙王子那里听到了不少人生经验。"] + }, + { + "selector": "#live2d-tool-asteroids", + "text": [ + "要不要来玩飞机大战?", + "这个按钮上写着「不要点击」。", + "想来和我一起玩个游戏吗?", + "听说这样可以蹦迪!" + ] + }, + { + "selector": "#live2d-tool-switch-model", + "text": [ + "你是不是不爱人家了呀,呜呜呜~", + "要见见我的姐姐嘛?", + "想要看看我妹妹嘛?", + "要切换看板娘吗?" + ] + }, + { + "selector": "#live2d-tool-switch-texture", + "text": [ + "喜欢换装 PLAY 吗?", + "这次要扮演什么呢?", + "变装!", + "让我们看看接下来会发生什么!" + ] + }, + { + "selector": "#live2d-tool-photo", + "text": [ + "你要给我拍照呀?一二三~茄子~", + "要不,我们来合影吧!", + "保持微笑就好了~" + ] + }, + { + "selector": "#live2d-tool-info", + "text": [ + "想要知道更多关于我的事么?", + "这里记录着我搬家的历史呢。", + "你想深入了解我什么呢?" + ] + }, + { + "selector": "#live2d-tool-quit", + "text": [ + "到了要说再见的时候了吗?", + "呜呜 QAQ 后会有期……", + "不要抛弃我呀……", + "我们,还能再见面吗……", + "哼,你会后悔的!" + ] + }, + { + "selector": "a[href='/']", + "text": [ + "点击前往首页,想回到上一页可以使用浏览器的后退功能哦。", + "点它就可以回到首页啦!", + "回首页看看吧。" + ] + }, + { + "selector": "a[href$='/about']", + "text": [ + "你想知道我家主人是谁吗?", + "这里有一些关于我家主人的秘密哦,要不要看看呢?", + "发现主人出没地点!" + ] + }, + { + "selector": "a[href='/tags']", + "text": ["点击就可以看文章的标签啦!", "点击来查看所有标签哦。"] + }, + { + "selector": "a[href='/categories']", + "text": ["文章都分类好啦~", "点击来查看文章分类哦。"] + }, + { + "selector": "a[href='/archives']", + "text": [ + "翻页比较麻烦吗,那就来看看文章归档吧。", + "文章目录都整理在这里啦!" + ] + }, + { + "selector": "#header-menu a", + "text": ["快看看这里都有什么呢?"] + }, + { + "selector": ".site-author", + "text": ["我家主人好看吗?", "这是我家主人(*´∇`*)"] + }, + { + "selector": ".site-state", + "text": ["这是文章的统计信息~", "要不要点进去看看?"] + }, + { + "selector": ".cc-opacity, .post-copyright-author", + "text": [ + "要记得规范转载哦。", + "所有文章均采用 CC BY-NC-SA 4.0 许可协议~", + "转载前要先注意下文章的版权协议呢。" + ] + }, + { + "selector": ".links-of-author", + "text": ["这里是主人的常驻地址哦。", "这里有主人的联系方式!"] + }, + { + "selector": ".followme", + "text": ["手机扫一下就能继续看,很方便呢~", "扫一扫,打开新世界的大门!"] + }, + { + "selector": ".fancybox img, img.medium-zoom-image", + "text": ["点击图片可以放大呢!"] + }, + { + "selector": ".copy-btn", + "text": ["代码可以直接点击复制哟。"] + }, + { + "selector": ".highlight .table-container, .gist", + "text": ["GitHub!我是新手!", "有问题为什么不先问问神奇海螺呢?"] + }, + { + "selector": "a[href^='mailto']", + "text": ["邮件我会及时回复的!", "点击就可以发送邮件啦~"] + }, + { + "selector": "a[href^='/tags/']", + "text": [ + "要去看看 {text} 标签么?", + "点它可以查看此标签下的所有文章哟!" + ] + }, + { + "selector": "a[href^='/categories/']", + "text": [ + "要去看看 {text} 分类么?", + "点它可以查看此分类下的所有文章哟!" + ] + }, + { + "selector": "#post-list > div", + "text": ["要看看 {text} 这篇文章吗?"] + }, + { + "selector": "a[rel='contents']", + "text": ["点击来阅读全文哦。"] + }, + { + "selector": ".beian a", + "text": ["我也是有户口的人哦。", "我的主人可是遵纪守法的好主人。"] + }, + { + "selector": ".container a[href^='http'], .nav-link .nav-text", + "text": [ + "要去看看 {text} 么?", + "去 {text} 逛逛吧。", + "到 {text} 看看吧。" + ] + }, + { + "selector": ".back-to-top", + "text": [ + "点它就可以回到顶部啦!", + "又回到最初的起点~", + "要回到开始的地方么?" + ] + }, + { + "selector": ".reward-container", + "text": [ + "我是不是棒棒哒~快给我点赞吧!", + "要打赏我嘛?好期待啊~", + "主人最近在吃土呢,很辛苦的样子,给他一些钱钱吧~" + ] + }, + { + "selector": "#wechat", + "text": ["这是我的微信二维码~"] + }, + { + "selector": "#alipay", + "text": ["这是我的支付宝哦!"] + }, + { + "selector": ".need-share-button_weibo", + "text": ["微博?来分享一波喵!"] + }, + { + "selector": ".need-share-button_wechat", + "text": ["分享到微信吧!"] + }, + { + "selector": ".need-share-button_douban", + "text": ["分享到豆瓣好像也不错!"] + }, + { + "selector": ".need-share-button_qqzone", + "text": ["QQ 空间,一键转发,耶~"] + }, + { + "selector": ".need-share-button_twitter", + "text": ["Twitter?好像是不存在的东西?"] + }, + { + "selector": ".need-share-button_facebook", + "text": ["emmm…FB 好像也是不存在的东西?"] + }, + { + "selector": ".post-nav-item a[rel='next']", + "text": [ + "来看看下一篇文章吧。", + "点它可以看下一篇文章哦!", + "要翻到下一篇文章吗?" + ] + }, + { + "selector": ".post-nav-item a[rel='prev']", + "text": [ + "来看看上一篇文章吧。", + "点它可以看上一篇文章哦!", + "要翻到上一篇文章吗?" + ] + }, + { + "selector": ".extend.next", + "text": ["去下一页看看吧。", "点它可以前进哦!", "要翻到下一页吗?"] + }, + { + "selector": ".extend.prev", + "text": ["去上一页看看吧。", "点它可以后退哦!", "要翻到上一页吗?"] + }, + { + "selector": ".rounded-base", + "text": [ + "想要去评论些什么吗?", + "要说点什么吗?", + "觉得博客不错?快来留言和主人交流吧!" + ] + }, + { + "selector": ".rounded-base a", + "text": [ + "你会不会熟练使用 Markdown 呀?", + "使用 Markdown 让评论更美观吧~" + ] + }, + { + "selector": ".relative", + "text": ["要插入一个萌萌哒的表情吗?", "要来一发表情吗?"] + }, + { + "selector": ".btn-secondary", + "text": ["要对自己的发言负责哦~", "要提交了吗,请耐心等待回复哦~"] + }, + { + "selector": ".comment-item", + "text": ["哇,快看看这个精彩评论!", "如果有疑问,请尽快留言哦~"] + } + ], + "click": [ + { + "selector": "#live2d", + "text": [ + "是…是不小心碰到了吧…", + "萝莉控是什么呀?", + "你看到我的小熊了吗?", + "再摸的话我可要报警了!⌇●﹏●⌇", + "110 吗,这里有个变态一直在摸我(ó﹏ò。)", + "不要摸我了,我会告诉老婆来打你的!", + "干嘛动我呀!小心我咬你!", + "别摸我,有什么好摸的!" + ] + }, + { + "selector": ".rounded-base", + "text": ["要吐槽些什么呢?", "一定要认真填写喵~", "有什么想说的吗?"] + }, + { + "selector": ".btn-secondary", + "text": ["提交评论啦~"] + } + ], + "seasons": [ + { + "date": "01/01", + "text": "元旦了呢,新的一年又开始了,今年是{year}年~" + }, + { + "date": "02/14", + "text": "又是一年情人节,{year}年找到对象了嘛~" + }, + { + "date": "03/08", + "text": "今天是国际妇女节!" + }, + { + "date": "03/12", + "text": "今天是植树节,要保护环境呀!" + }, + { + "date": "04/01", + "text": "悄悄告诉你一个秘密~今天是愚人节,不要被骗了哦~" + }, + { + "date": "05/01", + "text": "今天是五一劳动节,计划好假期去哪里了吗~" + }, + { + "date": "06/01", + "text": "儿童节了呢,快活的时光总是短暂,要是永远长不大该多好啊…" + }, + { + "date": "09/03", + "text": "中国人民抗日战争胜利纪念日,铭记历史、缅怀先烈、珍爱和平、开创未来。" + }, + { + "date": "09/10", + "text": "教师节,在学校要给老师问声好呀~" + }, + { + "date": "10/01", + "text": "国庆节到了,为祖国母亲庆生!" + }, + { + "date": "11/05-11/12", + "text": "今年的双十一是和谁一起过的呢~" + }, + { + "date": "12/20-12/31", + "text": "这几天是圣诞节,主人肯定又去剁手买买买了~" + } + ], + "time": [ + { + "hour": "6-7", + "text": "早上好!一日之计在于晨,美好的一天就要开始了~" + }, + { + "hour": "8-11", + "text": "上午好!工作顺利嘛,不要久坐,多起来走动走动哦!" + }, + { + "hour": "12-13", + "text": "中午了,工作了一个上午,现在是午餐时间!" + }, + { + "hour": "14-17", + "text": "午后很容易犯困呢,今天的运动目标完成了吗?" + }, + { + "hour": "18-19", + "text": "傍晚了!窗外夕阳的景色很美丽呢,最美不过夕阳红~" + }, + { + "hour": "20-21", + "text": "晚上好,今天过得怎么样?" + }, + { + "hour": "22-23", + "text": ["已经这么晚了呀,早点休息吧,晚安~", "深夜时要爱护眼睛呀!"] + }, + { + "hour": "0-5", + "text": "你是夜猫子呀?这么晚还不睡觉,明天起的来嘛?" + } + ], + "message": { + "default": [ + "好久不见,日子过得好快呢……", + "大坏蛋!你都多久没理人家了呀,嘤嘤嘤~", + "呐~快来逗我玩吧!", + "拿小拳拳锤你胸口!", + "记得把小家加入收藏夹哦!" + ], + "console": "哈哈,你打开了控制台,是想要看看我的小秘密吗?", + "copy": "你都复制了些什么呀,转载要记得加上出处哦!", + "visibilitychange": "哇,你终于回来了~" + } +} diff --git a/packages/live2d/src/libs/live2d.min.js b/packages/live2d/src/libs/live2d.min.js new file mode 100644 index 0000000..156325a --- /dev/null +++ b/packages/live2d/src/libs/live2d.min.js @@ -0,0 +1,8121 @@ +!(function (t) { + function i(r) { + if (e[r]) return e[r].exports; + var o = (e[r] = { i: r, l: !1, exports: {} }); + return t[r].call(o.exports, o, o.exports, i), (o.l = !0), o.exports; + } + var e = {}; + (i.m = t), + (i.c = e), + (i.d = function (t, e, r) { + i.o(t, e) || + Object.defineProperty(t, e, { + configurable: !1, + enumerable: !0, + get: r, + }); + }), + (i.n = function (t) { + var e = + t && t.__esModule + ? function () { + return t.default; + } + : function () { + return t; + }; + return i.d(e, "a", e), e; + }), + (i.o = function (t, i) { + return Object.prototype.hasOwnProperty.call(t, i); + }), + (i.p = ""), + i((i.s = 4)); +})([ + function (t, i, e) { + "use strict"; + function r() { + (this.live2DModel = null), + (this.modelMatrix = null), + (this.eyeBlink = null), + (this.physics = null), + (this.pose = null), + (this.debugMode = !1), + (this.initialized = !1), + (this.updating = !1), + (this.alpha = 1), + (this.accAlpha = 0), + (this.lipSync = !1), + (this.lipSyncValue = 0), + (this.accelX = 0), + (this.accelY = 0), + (this.accelZ = 0), + (this.dragX = 0), + (this.dragY = 0), + (this.startTimeMSec = null), + (this.mainMotionManager = new h()), + (this.expressionManager = new h()), + (this.motions = {}), + (this.expressions = {}), + (this.isTexLoaded = !1); + } + function o() { + AMotion.prototype.constructor.call(this), (this.paramList = new Array()); + } + function n() { + (this.id = ""), (this.type = -1), (this.value = null); + } + function s() { + (this.nextBlinkTime = null), + (this.stateStartTime = null), + (this.blinkIntervalMsec = null), + (this.eyeState = g.STATE_FIRST), + (this.blinkIntervalMsec = 4e3), + (this.closingMotionMsec = 100), + (this.closedMotionMsec = 50), + (this.openingMotionMsec = 150), + (this.closeIfZero = !0), + (this.eyeID_L = "PARAM_EYE_L_OPEN"), + (this.eyeID_R = "PARAM_EYE_R_OPEN"); + } + function _() { + (this.tr = new Float32Array(16)), this.identity(); + } + function a(t, i) { + _.prototype.constructor.call(this), (this.width = t), (this.height = i); + } + function h() { + MotionQueueManager.prototype.constructor.call(this), + (this.currentPriority = null), + (this.reservePriority = null), + (this.super = MotionQueueManager.prototype); + } + function l() { + (this.physicsList = new Array()), + (this.startTimeMSec = UtSystem.getUserTimeMSec()); + } + function $() { + (this.lastTime = 0), + (this.lastModel = null), + (this.partsGroups = new Array()); + } + function u(t) { + (this.paramIndex = -1), + (this.partsIndex = -1), + (this.link = null), + (this.id = t); + } + function p() { + (this.EPSILON = 0.01), + (this.faceTargetX = 0), + (this.faceTargetY = 0), + (this.faceX = 0), + (this.faceY = 0), + (this.faceVX = 0), + (this.faceVY = 0), + (this.lastTimeSec = 0); + } + function f() { + _.prototype.constructor.call(this), + (this.screenLeft = null), + (this.screenRight = null), + (this.screenTop = null), + (this.screenBottom = null), + (this.maxLeft = null), + (this.maxRight = null), + (this.maxTop = null), + (this.maxBottom = null), + (this.max = Number.MAX_VALUE), + (this.min = 0); + } + function c() {} + var d = 0; + (r.prototype.getModelMatrix = function () { + return this.modelMatrix; + }), + (r.prototype.setAlpha = function (t) { + t > 0.999 && (t = 1), t < 0.001 && (t = 0), (this.alpha = t); + }), + (r.prototype.getAlpha = function () { + return this.alpha; + }), + (r.prototype.isInitialized = function () { + return this.initialized; + }), + (r.prototype.setInitialized = function (t) { + this.initialized = t; + }), + (r.prototype.isUpdating = function () { + return this.updating; + }), + (r.prototype.setUpdating = function (t) { + this.updating = t; + }), + (r.prototype.getLive2DModel = function () { + return this.live2DModel; + }), + (r.prototype.setLipSync = function (t) { + this.lipSync = t; + }), + (r.prototype.setLipSyncValue = function (t) { + this.lipSyncValue = t; + }), + (r.prototype.setAccel = function (t, i, e) { + (this.accelX = t), (this.accelY = i), (this.accelZ = e); + }), + (r.prototype.setDrag = function (t, i) { + (this.dragX = t), (this.dragY = i); + }), + (r.prototype.getMainMotionManager = function () { + return this.mainMotionManager; + }), + (r.prototype.getExpressionManager = function () { + return this.expressionManager; + }), + (r.prototype.loadModelData = function (t, i) { + var e = c.getPlatformManager(); + this.debugMode && e.log("Load model : " + t); + var r = this; + e.loadLive2DModel(t, function (t) { + if ( + ((r.live2DModel = t), + r.live2DModel.saveParam(), + 0 != Live2D.getError()) + ) + return void console.error("Error : Failed to loadModelData()."); + (r.modelMatrix = new a( + r.live2DModel.getCanvasWidth(), + r.live2DModel.getCanvasHeight() + )), + r.modelMatrix.setWidth(2), + r.modelMatrix.setCenterPosition(0, 0), + i(r.live2DModel); + }); + }), + (r.prototype.loadTexture = function (t, i, e) { + d++; + var r = c.getPlatformManager(); + this.debugMode && r.log("Load Texture : " + i); + var o = this; + r.loadTexture(this.live2DModel, t, i, function () { + d--, 0 == d && (o.isTexLoaded = !0), "function" == typeof e && e(); + }); + }), + (r.prototype.loadMotion = function (t, i, e) { + var r = c.getPlatformManager(); + this.debugMode && r.log("Load Motion : " + i); + var o = null, + n = this; + r.loadBytes(i, function (i) { + (o = Live2DMotion.loadMotion(i)), + null != t && (n.motions[t] = o), + e(o); + }); + }), + (r.prototype.loadExpression = function (t, i, e) { + var r = c.getPlatformManager(); + this.debugMode && r.log("Load Expression : " + i); + var n = this; + r.loadBytes(i, function (i) { + null != t && (n.expressions[t] = o.loadJson(i)), + "function" == typeof e && e(); + }); + }), + (r.prototype.loadPose = function (t, i) { + var e = c.getPlatformManager(); + this.debugMode && e.log("Load Pose : " + t); + var r = this; + try { + e.loadBytes(t, function (t) { + (r.pose = $.load(t)), "function" == typeof i && i(); + }); + } catch (t) { + console.warn(t); + } + }), + (r.prototype.loadPhysics = function (t) { + var i = c.getPlatformManager(); + this.debugMode && i.log("Load Physics : " + t); + var e = this; + try { + i.loadBytes(t, function (t) { + e.physics = l.load(t); + }); + } catch (t) { + console.warn(t); + } + }), + (r.prototype.hitTestSimple = function (t, i, e) { + if (null === this.live2DModel) return !1; + var r = this.live2DModel.getDrawDataIndex(t); + if (r < 0) return !1; + for ( + var o = this.live2DModel.getTransformedPoints(r), + n = this.live2DModel.getCanvasWidth(), + s = 0, + _ = this.live2DModel.getCanvasHeight(), + a = 0, + h = 0; + h < o.length; + h += 2 + ) { + var l = o[h], + $ = o[h + 1]; + l < n && (n = l), + l > s && (s = l), + $ < _ && (_ = $), + $ > a && (a = $); + } + var u = this.modelMatrix.invertTransformX(i), + p = this.modelMatrix.invertTransformY(e); + return n <= u && u <= s && _ <= p && p <= a; + }), + (r.prototype.hitTestSimpleCustom = function (t, i, e, r) { + return ( + null !== this.live2DModel && + e >= t[0] && + e <= i[0] && + r <= t[1] && + r >= i[1] + ); + }), + (o.prototype = new AMotion()), + (o.EXPRESSION_DEFAULT = "DEFAULT"), + (o.TYPE_SET = 0), + (o.TYPE_ADD = 1), + (o.TYPE_MULT = 2), + (o.loadJson = function (t) { + var i = new o(), + e = c.getPlatformManager(), + r = e.jsonParseFromBytes(t); + if ( + (i.setFadeIn(parseInt(r.fade_in) > 0 ? parseInt(r.fade_in) : 1e3), + i.setFadeOut(parseInt(r.fade_out) > 0 ? parseInt(r.fade_out) : 1e3), + null == r.params) + ) + return i; + var s = r.params, + _ = s.length; + i.paramList = []; + for (var a = 0; a < _; a++) { + var h = s[a], + l = h.id.toString(), + $ = parseFloat(h.val), + u = o.TYPE_ADD, + p = null != h.calc ? h.calc.toString() : "add"; + if ( + (u = + "add" === p + ? o.TYPE_ADD + : "mult" === p + ? o.TYPE_MULT + : "set" === p + ? o.TYPE_SET + : o.TYPE_ADD) == o.TYPE_ADD + ) { + var f = null == h.def ? 0 : parseFloat(h.def); + $ -= f; + } else if (u == o.TYPE_MULT) { + var f = null == h.def ? 1 : parseFloat(h.def); + 0 == f && (f = 1), ($ /= f); + } + var d = new n(); + (d.id = l), (d.type = u), (d.value = $), i.paramList.push(d); + } + return i; + }), + (o.prototype.updateParamExe = function (t, i, e, r) { + for (var n = this.paramList.length - 1; n >= 0; --n) { + var s = this.paramList[n]; + s.type == o.TYPE_ADD + ? t.addToParamFloat(s.id, s.value, e) + : s.type == o.TYPE_MULT + ? t.multParamFloat(s.id, s.value, e) + : s.type == o.TYPE_SET && t.setParamFloat(s.id, s.value, e); + } + }), + (s.prototype.calcNextBlink = function () { + return ( + UtSystem.getUserTimeMSec() + + Math.random() * (2 * this.blinkIntervalMsec - 1) + ); + }), + (s.prototype.setInterval = function (t) { + this.blinkIntervalMsec = t; + }), + (s.prototype.setEyeMotion = function (t, i, e) { + (this.closingMotionMsec = t), + (this.closedMotionMsec = i), + (this.openingMotionMsec = e); + }), + (s.prototype.updateParam = function (t) { + var i, + e = UtSystem.getUserTimeMSec(), + r = 0; + switch (this.eyeState) { + case g.STATE_CLOSING: + (r = (e - this.stateStartTime) / this.closingMotionMsec), + r >= 1 && + ((r = 1), + (this.eyeState = g.STATE_CLOSED), + (this.stateStartTime = e)), + (i = 1 - r); + break; + case g.STATE_CLOSED: + (r = (e - this.stateStartTime) / this.closedMotionMsec), + r >= 1 && + ((this.eyeState = g.STATE_OPENING), (this.stateStartTime = e)), + (i = 0); + break; + case g.STATE_OPENING: + (r = (e - this.stateStartTime) / this.openingMotionMsec), + r >= 1 && + ((r = 1), + (this.eyeState = g.STATE_INTERVAL), + (this.nextBlinkTime = this.calcNextBlink())), + (i = r); + break; + case g.STATE_INTERVAL: + this.nextBlinkTime < e && + ((this.eyeState = g.STATE_CLOSING), (this.stateStartTime = e)), + (i = 1); + break; + case g.STATE_FIRST: + default: + (this.eyeState = g.STATE_INTERVAL), + (this.nextBlinkTime = this.calcNextBlink()), + (i = 1); + } + this.closeIfZero || (i = -i), + t.setParamFloat(this.eyeID_L, i), + t.setParamFloat(this.eyeID_R, i); + }); + var g = function () {}; + (g.STATE_FIRST = "STATE_FIRST"), + (g.STATE_INTERVAL = "STATE_INTERVAL"), + (g.STATE_CLOSING = "STATE_CLOSING"), + (g.STATE_CLOSED = "STATE_CLOSED"), + (g.STATE_OPENING = "STATE_OPENING"), + (_.mul = function (t, i, e) { + var r, + o, + n, + s = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + for (r = 0; r < 4; r++) + for (o = 0; o < 4; o++) + for (n = 0; n < 4; n++) s[r + 4 * o] += t[r + 4 * n] * i[n + 4 * o]; + for (r = 0; r < 16; r++) e[r] = s[r]; + }), + (_.prototype.identity = function () { + for (var t = 0; t < 16; t++) this.tr[t] = t % 5 == 0 ? 1 : 0; + }), + (_.prototype.getArray = function () { + return this.tr; + }), + (_.prototype.getCopyMatrix = function () { + return new Float32Array(this.tr); + }), + (_.prototype.setMatrix = function (t) { + if (null != this.tr && this.tr.length == this.tr.length) + for (var i = 0; i < 16; i++) this.tr[i] = t[i]; + }), + (_.prototype.getScaleX = function () { + return this.tr[0]; + }), + (_.prototype.getScaleY = function () { + return this.tr[5]; + }), + (_.prototype.transformX = function (t) { + return (this.tr[0] * t * 8) / 3 + this.tr[12]; + }), + (_.prototype.transformY = function (t) { + return (this.tr[5] * t * 8) / 3 + this.tr[13]; + }), + (_.prototype.invertTransformX = function (t) { + return (t - this.tr[12]) / this.tr[0]; + }), + (_.prototype.invertTransformY = function (t) { + return (t - this.tr[13]) / this.tr[5]; + }), + (_.prototype.multTranslate = function (t, i) { + var e = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, t, i, 0, 1]; + _.mul(e, this.tr, this.tr); + }), + (_.prototype.translate = function (t, i) { + (this.tr[12] = t), (this.tr[13] = i); + }), + (_.prototype.translateX = function (t) { + this.tr[12] = t; + }), + (_.prototype.translateY = function (t) { + this.tr[13] = t; + }), + (_.prototype.multScale = function (t, i) { + var e = [t, 0, 0, 0, 0, i, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]; + _.mul(e, this.tr, this.tr); + }), + (_.prototype.scale = function (t, i) { + (this.tr[0] = t), (this.tr[5] = i); + }), + (a.prototype = new _()), + (a.prototype.setPosition = function (t, i) { + this.translate(t, i); + }), + (a.prototype.setCenterPosition = function (t, i) { + var e = this.width * this.getScaleX(), + r = this.height * this.getScaleY(); + this.translate(t - e / 2, i - r / 2); + }), + (a.prototype.top = function (t) { + this.setY(t); + }), + (a.prototype.bottom = function (t) { + var i = this.height * this.getScaleY(); + this.translateY(t - i); + }), + (a.prototype.left = function (t) { + this.setX(t); + }), + (a.prototype.right = function (t) { + var i = this.width * this.getScaleX(); + this.translateX(t - i); + }), + (a.prototype.centerX = function (t) { + var i = this.width * this.getScaleX(); + this.translateX(t - i / 2); + }), + (a.prototype.centerY = function (t) { + var i = this.height * this.getScaleY(); + this.translateY(t - i / 2); + }), + (a.prototype.setX = function (t) { + this.translateX(t); + }), + (a.prototype.setY = function (t) { + this.translateY(t); + }), + (a.prototype.setHeight = function (t) { + var i = t / this.height, + e = -i; + this.scale(i, e); + }), + (a.prototype.setWidth = function (t) { + var i = t / this.width, + e = -i; + this.scale(i, e); + }), + (h.prototype = new MotionQueueManager()), + (h.prototype.getCurrentPriority = function () { + return this.currentPriority; + }), + (h.prototype.getReservePriority = function () { + return this.reservePriority; + }), + (h.prototype.reserveMotion = function (t) { + return ( + !(this.reservePriority >= t) && + !(this.currentPriority >= t) && + ((this.reservePriority = t), !0) + ); + }), + (h.prototype.setReservePriority = function (t) { + this.reservePriority = t; + }), + (h.prototype.updateParam = function (t) { + var i = MotionQueueManager.prototype.updateParam.call(this, t); + return this.isFinished() && (this.currentPriority = 0), i; + }), + (h.prototype.startMotionPrio = function (t, i) { + return ( + i == this.reservePriority && (this.reservePriority = 0), + (this.currentPriority = i), + this.startMotion(t, !1) + ); + }), + (l.load = function (t) { + for ( + var i = new l(), + e = c.getPlatformManager(), + r = e.jsonParseFromBytes(t), + o = r.physics_hair, + n = o.length, + s = 0; + s < n; + s++ + ) { + var _ = o[s], + a = new PhysicsHair(), + h = _.setup, + $ = parseFloat(h.length), + u = parseFloat(h.regist), + p = parseFloat(h.mass); + a.setup($, u, p); + for (var f = _.src, d = f.length, g = 0; g < d; g++) { + var y = f[g], + m = y.id, + T = PhysicsHair.Src.SRC_TO_X, + P = y.ptype; + "x" === P + ? (T = PhysicsHair.Src.SRC_TO_X) + : "y" === P + ? (T = PhysicsHair.Src.SRC_TO_Y) + : "angle" === P + ? (T = PhysicsHair.Src.SRC_TO_G_ANGLE) + : UtDebug.error("live2d", "Invalid parameter:PhysicsHair.Src"); + var S = parseFloat(y.scale), + v = parseFloat(y.weight); + a.addSrcParam(T, m, S, v); + } + for (var L = _.targets, M = L.length, g = 0; g < M; g++) { + var E = L[g], + m = E.id, + T = PhysicsHair.Target.TARGET_FROM_ANGLE, + P = E.ptype; + "angle" === P + ? (T = PhysicsHair.Target.TARGET_FROM_ANGLE) + : "angle_v" === P + ? (T = PhysicsHair.Target.TARGET_FROM_ANGLE_V) + : UtDebug.error("live2d", "Invalid parameter:PhysicsHair.Target"); + var S = parseFloat(E.scale), + v = parseFloat(E.weight); + a.addTargetParam(T, m, S, v); + } + i.physicsList.push(a); + } + return i; + }), + (l.prototype.updateParam = function (t) { + for ( + var i = UtSystem.getUserTimeMSec() - this.startTimeMSec, e = 0; + e < this.physicsList.length; + e++ + ) + this.physicsList[e].update(t, i); + }), + ($.load = function (t) { + for ( + var i = new $(), + e = c.getPlatformManager(), + r = e.jsonParseFromBytes(t), + o = r.parts_visible, + n = o.length, + s = 0; + s < n; + s++ + ) { + for ( + var _ = o[s], a = _.group, h = a.length, l = new Array(), p = 0; + p < h; + p++ + ) { + var f = a[p], + d = new u(f.id); + if (((l[p] = d), null != f.link)) { + var g = f.link, + y = g.length; + d.link = new Array(); + for (var m = 0; m < y; m++) { + var T = new u(g[m]); + d.link.push(T); + } + } + } + i.partsGroups.push(l); + } + return i; + }), + ($.prototype.updateParam = function (t) { + if (null != t) { + t != this.lastModel && this.initParam(t), (this.lastModel = t); + var i = UtSystem.getUserTimeMSec(), + e = 0 == this.lastTime ? 0 : (i - this.lastTime) / 1e3; + (this.lastTime = i), e < 0 && (e = 0); + for (var r = 0; r < this.partsGroups.length; r++) + this.normalizePartsOpacityGroup(t, this.partsGroups[r], e), + this.copyOpacityOtherParts(t, this.partsGroups[r]); + } + }), + ($.prototype.initParam = function (t) { + if (null != t) + for (var i = 0; i < this.partsGroups.length; i++) + for (var e = this.partsGroups[i], r = 0; r < e.length; r++) { + e[r].initIndex(t); + var o = e[r].partsIndex, + n = e[r].paramIndex; + if (!(o < 0)) { + var s = 0 != t.getParamFloat(n); + if ( + (t.setPartsOpacity(o, s ? 1 : 0), + t.setParamFloat(n, s ? 1 : 0), + null != e[r].link) + ) + for (var _ = 0; _ < e[r].link.length; _++) + e[r].link[_].initIndex(t); + } + } + }), + ($.prototype.normalizePartsOpacityGroup = function (t, i, e) { + for (var r = -1, o = 1, n = 0; n < i.length; n++) { + var s = i[n].partsIndex, + _ = i[n].paramIndex; + if (!(s < 0) && 0 != t.getParamFloat(_)) { + if (r >= 0) break; + (r = n), + (o = t.getPartsOpacity(s)), + (o += e / 0.5), + o > 1 && (o = 1); + } + } + r < 0 && ((r = 0), (o = 1)); + for (var n = 0; n < i.length; n++) { + var s = i[n].partsIndex; + if (!(s < 0)) + if (r == n) t.setPartsOpacity(s, o); + else { + var a, + h = t.getPartsOpacity(s); + a = o < 0.5 ? (-0.5 * o) / 0.5 + 1 : (0.5 * (1 - o)) / 0.5; + var l = (1 - a) * (1 - o); + l > 0.15 && (a = 1 - 0.15 / (1 - o)), + h > a && (h = a), + t.setPartsOpacity(s, h); + } + } + }), + ($.prototype.copyOpacityOtherParts = function (t, i) { + for (var e = 0; e < i.length; e++) { + var r = i[e]; + if (null != r.link && !(r.partsIndex < 0)) + for ( + var o = t.getPartsOpacity(r.partsIndex), n = 0; + n < r.link.length; + n++ + ) { + var s = r.link[n]; + s.partsIndex < 0 || t.setPartsOpacity(s.partsIndex, o); + } + } + }), + (u.prototype.initIndex = function (t) { + (this.paramIndex = t.getParamIndex("VISIBLE:" + this.id)), + (this.partsIndex = t.getPartsDataIndex(PartsDataID.getID(this.id))), + t.setParamFloat(this.paramIndex, 1); + }), + (p.FRAME_RATE = 30), + (p.prototype.setPoint = function (t, i) { + (this.faceTargetX = t), (this.faceTargetY = i); + }), + (p.prototype.getX = function () { + return this.faceX; + }), + (p.prototype.getY = function () { + return this.faceY; + }), + (p.prototype.update = function () { + var t = 40 / 7.5 / p.FRAME_RATE; + if (0 == this.lastTimeSec) + return void (this.lastTimeSec = UtSystem.getUserTimeMSec()); + var i = UtSystem.getUserTimeMSec(), + e = ((i - this.lastTimeSec) * p.FRAME_RATE) / 1e3; + this.lastTimeSec = i; + var r = 0.15 * p.FRAME_RATE, + o = (e * t) / r, + n = this.faceTargetX - this.faceX, + s = this.faceTargetY - this.faceY; + if (!(Math.abs(n) <= this.EPSILON && Math.abs(s) <= this.EPSILON)) { + var _ = Math.sqrt(n * n + s * s), + a = (t * n) / _, + h = (t * s) / _, + l = a - this.faceVX, + $ = h - this.faceVY, + u = Math.sqrt(l * l + $ * $); + (u < -o || u > o) && ((l *= o / u), ($ *= o / u), (u = o)), + (this.faceVX += l), + (this.faceVY += $); + var f = 0.5 * (Math.sqrt(o * o + 16 * o * _ - 8 * o * _) - o), + c = Math.sqrt( + this.faceVX * this.faceVX + this.faceVY * this.faceVY + ); + c > f && ((this.faceVX *= f / c), (this.faceVY *= f / c)), + (this.faceX += this.faceVX), + (this.faceY += this.faceVY); + } + }), + (f.prototype = new _()), + (f.prototype.getMaxScale = function () { + return this.max; + }), + (f.prototype.getMinScale = function () { + return this.min; + }), + (f.prototype.setMaxScale = function (t) { + this.max = t; + }), + (f.prototype.setMinScale = function (t) { + this.min = t; + }), + (f.prototype.isMaxScale = function () { + return this.getScaleX() == this.max; + }), + (f.prototype.isMinScale = function () { + return this.getScaleX() == this.min; + }), + (f.prototype.adjustTranslate = function (t, i) { + this.tr[0] * this.maxLeft + (this.tr[12] + t) > this.screenLeft && + (t = this.screenLeft - this.tr[0] * this.maxLeft - this.tr[12]), + this.tr[0] * this.maxRight + (this.tr[12] + t) < this.screenRight && + (t = this.screenRight - this.tr[0] * this.maxRight - this.tr[12]), + this.tr[5] * this.maxTop + (this.tr[13] + i) < this.screenTop && + (i = this.screenTop - this.tr[5] * this.maxTop - this.tr[13]), + this.tr[5] * this.maxBottom + (this.tr[13] + i) > this.screenBottom && + (i = this.screenBottom - this.tr[5] * this.maxBottom - this.tr[13]); + var e = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, t, i, 0, 1]; + _.mul(e, this.tr, this.tr); + }), + (f.prototype.adjustScale = function (t, i, e) { + var r = e * this.tr[0]; + r < this.min + ? this.tr[0] > 0 && (e = this.min / this.tr[0]) + : r > this.max && this.tr[0] > 0 && (e = this.max / this.tr[0]); + var o = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, t, i, 0, 1], + n = [e, 0, 0, 0, 0, e, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], + s = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -t, -i, 0, 1]; + _.mul(s, this.tr, this.tr), + _.mul(n, this.tr, this.tr), + _.mul(o, this.tr, this.tr); + }), + (f.prototype.setScreenRect = function (t, i, e, r) { + (this.screenLeft = t), + (this.screenRight = i), + (this.screenTop = r), + (this.screenBottom = e); + }), + (f.prototype.setMaxScreenRect = function (t, i, e, r) { + (this.maxLeft = t), + (this.maxRight = i), + (this.maxTop = r), + (this.maxBottom = e); + }), + (f.prototype.getScreenLeft = function () { + return this.screenLeft; + }), + (f.prototype.getScreenRight = function () { + return this.screenRight; + }), + (f.prototype.getScreenBottom = function () { + return this.screenBottom; + }), + (f.prototype.getScreenTop = function () { + return this.screenTop; + }), + (f.prototype.getMaxLeft = function () { + return this.maxLeft; + }), + (f.prototype.getMaxRight = function () { + return this.maxRight; + }), + (f.prototype.getMaxBottom = function () { + return this.maxBottom; + }), + (f.prototype.getMaxTop = function () { + return this.maxTop; + }), + (c.platformManager = null), + (c.getPlatformManager = function () { + return c.platformManager; + }), + (c.setPlatformManager = function (t) { + c.platformManager = t; + }), + (t.exports = { + L2DTargetPoint: p, + Live2DFramework: c, + L2DViewMatrix: f, + L2DPose: $, + L2DPartsParam: u, + L2DPhysics: l, + L2DMotionManager: h, + L2DModelMatrix: a, + L2DMatrix44: _, + EYE_STATE: g, + L2DEyeBlink: s, + L2DExpressionParam: n, + L2DExpressionMotion: o, + L2DBaseModel: r, + }); + }, + function (t, i, e) { + "use strict"; + var r = { + DEBUG_LOG: !1, + DEBUG_MOUSE_LOG: !1, + DEBUG_DRAW_HIT_AREA: !1, + DEBUG_DRAW_ALPHA_MODEL: !1, + VIEW_MAX_SCALE: 2, + VIEW_MIN_SCALE: 0.8, + VIEW_LOGICAL_LEFT: -1, + VIEW_LOGICAL_RIGHT: 1, + VIEW_LOGICAL_MAX_LEFT: -2, + VIEW_LOGICAL_MAX_RIGHT: 2, + VIEW_LOGICAL_MAX_BOTTOM: -2, + VIEW_LOGICAL_MAX_TOP: 2, + PRIORITY_NONE: 0, + PRIORITY_IDLE: 1, + PRIORITY_SLEEPY: 2, + PRIORITY_NORMAL: 3, + PRIORITY_FORCE: 4, + MOTION_GROUP_IDLE: "idle", + MOTION_GROUP_SLEEPY: "sleepy", + MOTION_GROUP_TAP_BODY: "tap_body", + MOTION_GROUP_FLICK_HEAD: "flick_head", + MOTION_GROUP_PINCH_IN: "pinch_in", + MOTION_GROUP_PINCH_OUT: "pinch_out", + MOTION_GROUP_SHAKE: "shake", + HIT_AREA_HEAD: "head", + HIT_AREA_BODY: "body", + }; + t.exports = r; + }, + function (t, i, e) { + "use strict"; + function r(t) { + n = t; + } + function o() { + return n; + } + Object.defineProperty(i, "__esModule", { value: !0 }), + (i.setContext = r), + (i.getContext = o); + var n = void 0; + }, + function (t, i, e) { + "use strict"; + function r() {} + (r.matrixStack = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]), + (r.depth = 0), + (r.currentMatrix = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]), + (r.tmp = new Array(16)), + (r.reset = function () { + this.depth = 0; + }), + (r.loadIdentity = function () { + for (var t = 0; t < 16; t++) this.currentMatrix[t] = t % 5 == 0 ? 1 : 0; + }), + (r.push = function () { + var t = (this.depth, 16 * (this.depth + 1)); + this.matrixStack.length < t + 16 && (this.matrixStack.length = t + 16); + for (var i = 0; i < 16; i++) + this.matrixStack[t + i] = this.currentMatrix[i]; + this.depth++; + }), + (r.pop = function () { + --this.depth < 0 && + (myError("Invalid matrix stack."), (this.depth = 0)); + for (var t = 16 * this.depth, i = 0; i < 16; i++) + this.currentMatrix[i] = this.matrixStack[t + i]; + }), + (r.getMatrix = function () { + return this.currentMatrix; + }), + (r.multMatrix = function (t) { + var i, e, r; + for (i = 0; i < 16; i++) this.tmp[i] = 0; + for (i = 0; i < 4; i++) + for (e = 0; e < 4; e++) + for (r = 0; r < 4; r++) + this.tmp[i + 4 * e] += + this.currentMatrix[i + 4 * r] * t[r + 4 * e]; + for (i = 0; i < 16; i++) this.currentMatrix[i] = this.tmp[i]; + }), + (t.exports = r); + }, + function (t, i, e) { + t.exports = e(5); + }, + function (t, i, e) { + "use strict"; + function r(t) { + return t && t.__esModule ? t : { default: t }; + } + function o(t) { + (C = t), + C.addEventListener && + (window.addEventListener("click", g), + window.addEventListener("mousedown", g), + window.addEventListener("mousemove", g), + window.addEventListener("mouseup", g), + document.addEventListener("mouseout", g), + window.addEventListener("touchstart", y), + window.addEventListener("touchend", y), + window.addEventListener("touchmove", y)); + } + function n(t) { + var i = C.width, + e = C.height; + N = new M.L2DTargetPoint(); + var r = e / i, + o = w.default.VIEW_LOGICAL_LEFT, + n = w.default.VIEW_LOGICAL_RIGHT, + _ = -r, + h = r; + if ( + ((window.Live2D.captureFrame = !1), + (B = new M.L2DViewMatrix()), + B.setScreenRect(o, n, _, h), + B.setMaxScreenRect( + w.default.VIEW_LOGICAL_MAX_LEFT, + w.default.VIEW_LOGICAL_MAX_RIGHT, + w.default.VIEW_LOGICAL_MAX_BOTTOM, + w.default.VIEW_LOGICAL_MAX_TOP + ), + B.setMaxScale(w.default.VIEW_MAX_SCALE), + B.setMinScale(w.default.VIEW_MIN_SCALE), + (U = new M.L2DMatrix44()), + U.multScale(1, i / e), + (G = new M.L2DMatrix44()), + G.multTranslate(-i / 2, -e / 2), + G.multScale(2 / i, -2 / i), + (F = v()), + (0, D.setContext)(F), + !F) + ) + return ( + console.error("Failed to create WebGL context."), + void ( + window.WebGLRenderingContext && + console.error( + "Your browser don't support WebGL, check https://get.webgl.org/ for futher information." + ) + ) + ); + window.Live2D.setGL(F), F.clearColor(0, 0, 0, 0), a(t), s(); + } + function s() { + b || + ((b = !0), + (function t() { + _(); + var i = + window.requestAnimationFrame || + window.mozRequestAnimationFrame || + window.webkitRequestAnimationFrame || + window.msRequestAnimationFrame; + if (window.Live2D.captureFrame) { + window.Live2D.captureFrame = !1; + var e = document.createElement("a"); + document.body.appendChild(e), + e.setAttribute("type", "hidden"), + (e.href = C.toDataURL()), + (e.download = window.Live2D.captureName || "live2d.png"), + e.click(); + } + i(t, C); + })()); + } + function _() { + O.default.reset(), + O.default.loadIdentity(), + N.update(), + R.setDrag(N.getX(), N.getY()), + F.clear(F.COLOR_BUFFER_BIT), + O.default.multMatrix(U.getArray()), + O.default.multMatrix(B.getArray()), + O.default.push(); + for (var t = 0; t < R.numModels(); t++) { + var i = R.getModel(t); + if (null == i) return; + i.initialized && !i.updating && (i.update(), i.draw(F)); + } + O.default.pop(); + } + function a(t) { + (R.reloadFlg = !0), R.count++, R.changeModel(F, t); + } + function h(t, i) { + return t.x * i.x + t.y * i.y; + } + function l(t, i) { + var e = Math.sqrt(t * t + i * i); + return { x: t / e, y: i / e }; + } + function $(t, i, e) { + function r(t, i) { + return (180 * Math.acos(h({ x: 0, y: 1 }, l(t, i)))) / Math.PI; + } + if ( + i.x < e.left + e.width && + i.y < e.top + e.height && + i.x > e.left && + i.y > e.top + ) + return i; + var o = t.x - i.x, + n = t.y - i.y, + s = r(o, n); + i.x < t.x && (s = 360 - s); + var _ = 360 - r(e.left - t.x, -1 * (e.top - t.y)), + a = 360 - r(e.left - t.x, -1 * (e.top + e.height - t.y)), + $ = r(e.left + e.width - t.x, -1 * (e.top - t.y)), + u = r(e.left + e.width - t.x, -1 * (e.top + e.height - t.y)), + p = n / o, + f = {}; + if (s < $) { + var c = e.top - t.y, + d = c / p; + f = { y: t.y + c, x: t.x + d }; + } else if (s < u) { + var g = e.left + e.width - t.x, + y = g * p; + f = { y: t.y + y, x: t.x + g }; + } else if (s < a) { + var m = e.top + e.height - t.y, + T = m / p; + f = { y: t.y + m, x: t.x + T }; + } else if (s < _) { + var P = t.x - e.left, + S = P * p; + f = { y: t.y - S, x: t.x - P }; + } else { + var v = e.top - t.y, + L = v / p; + f = { y: t.y + v, x: t.x + L }; + } + return f; + } + function u(t) { + Y = !0; + var i = C.getBoundingClientRect(), + e = P(t.clientX - i.left), + r = S(t.clientY - i.top), + o = $( + { x: i.left + i.width / 2, y: i.top + i.height * X }, + { x: t.clientX, y: t.clientY }, + i + ), + n = m(o.x - i.left), + s = T(o.y - i.top); + w.default.DEBUG_MOUSE_LOG && + console.log( + "onMouseMove device( x:" + + t.clientX + + " y:" + + t.clientY + + " ) view( x:" + + n + + " y:" + + s + + ")" + ), + (k = e), + (V = r), + N.setPoint(n, s); + } + function p(t) { + Y = !0; + var i = C.getBoundingClientRect(), + e = P(t.clientX - i.left), + r = S(t.clientY - i.top), + o = $( + { x: i.left + i.width / 2, y: i.top + i.height * X }, + { x: t.clientX, y: t.clientY }, + i + ), + n = m(o.x - i.left), + s = T(o.y - i.top); + w.default.DEBUG_MOUSE_LOG && + console.log( + "onMouseDown device( x:" + + t.clientX + + " y:" + + t.clientY + + " ) view( x:" + + n + + " y:" + + s + + ")" + ), + (k = e), + (V = r), + R.tapEvent(n, s); + } + function f(t) { + var i = C.getBoundingClientRect(), + e = P(t.clientX - i.left), + r = S(t.clientY - i.top), + o = $( + { x: i.left + i.width / 2, y: i.top + i.height * X }, + { x: t.clientX, y: t.clientY }, + i + ), + n = m(o.x - i.left), + s = T(o.y - i.top); + w.default.DEBUG_MOUSE_LOG && + console.log( + "onMouseMove device( x:" + + t.clientX + + " y:" + + t.clientY + + " ) view( x:" + + n + + " y:" + + s + + ")" + ), + Y && ((k = e), (V = r), N.setPoint(n, s)); + } + function c() { + Y && (Y = !1), N.setPoint(0, 0); + } + function d() { + w.default.DEBUG_LOG && console.log("Set Session Storage."), + sessionStorage.setItem("Sleepy", "1"); + } + function g(t) { + if ("mousewheel" == t.type); + else if ("mousedown" == t.type) p(t); + else if ("mousemove" == t.type) { + var i = sessionStorage.getItem("Sleepy"); + "1" === i && sessionStorage.setItem("Sleepy", "0"), u(t); + } else if ("mouseup" == t.type) { + if ("button" in t && 0 != t.button) return; + } else if ("mouseout" == t.type) { + w.default.DEBUG_LOG && console.log("Mouse out Window."), c(); + var e = sessionStorage.getItem("SleepyTimer"); + window.clearTimeout(e), + (e = window.setTimeout(d, 5e4)), + sessionStorage.setItem("SleepyTimer", e); + } + } + function y(t) { + var i = t.touches[0]; + "touchstart" == t.type + ? 1 == t.touches.length && u(i) + : "touchmove" == t.type + ? f(i) + : "touchend" == t.type && c(); + } + function m(t) { + var i = G.transformX(t); + return B.invertTransformX(i); + } + function T(t) { + var i = G.transformY(t); + return B.invertTransformY(i); + } + function P(t) { + return G.transformX(t); + } + function S(t) { + return G.transformY(t); + } + function v() { + for ( + var t = ["webgl", "experimental-webgl", "webkit-3d", "moz-webgl"], + i = 0; + i < t.length; + i++ + ) + try { + var e = C.getContext(t[i], { premultipliedAlpha: !0 }); + if (e) return e; + } catch (t) {} + return null; + } + function L(t, i, e) { + (X = void 0 === e ? 0.5 : e), o(t), n(i); + } + e(6); + var M = e(0), + E = e(8), + A = r(E), + I = e(1), + w = r(I), + x = e(3), + O = r(x), + D = e(2), + R = (window.navigator.platform.toLowerCase(), new A.default()), + b = !1, + F = null, + C = null, + N = null, + B = null, + U = null, + G = null, + Y = !1, + k = 0, + V = 0, + X = 0.5; + window.loadlive2d = L; + }, + function (t, i, e) { + "use strict"; + (function (t) { + !(function () { + function i() { + At || + ((this._$MT = null), + (this._$5S = null), + (this._$NP = 0), + i._$42++, + (this._$5S = new Y(this))); + } + function e(t) { + if (!At) { + (this.clipContextList = new Array()), + (this.glcontext = t.gl), + (this.dp_webgl = t), + (this.curFrameNo = 0), + (this.firstError_clipInNotUpdate = !0), + (this.colorBuffer = 0), + (this.isInitGLFBFunc = !1), + (this.tmpBoundsOnModel = new S()), + at.glContext.length > at.frameBuffers.length && + (this.curFrameNo = this.getMaskRenderTexture()), + (this.tmpModelToViewMatrix = new R()), + (this.tmpMatrix2 = new R()), + (this.tmpMatrixForMask = new R()), + (this.tmpMatrixForDraw = new R()), + (this.CHANNEL_COLORS = new Array()); + var i = new A(); + (i = new A()), + (i.r = 0), + (i.g = 0), + (i.b = 0), + (i.a = 1), + this.CHANNEL_COLORS.push(i), + (i = new A()), + (i.r = 1), + (i.g = 0), + (i.b = 0), + (i.a = 0), + this.CHANNEL_COLORS.push(i), + (i = new A()), + (i.r = 0), + (i.g = 1), + (i.b = 0), + (i.a = 0), + this.CHANNEL_COLORS.push(i), + (i = new A()), + (i.r = 0), + (i.g = 0), + (i.b = 1), + (i.a = 0), + this.CHANNEL_COLORS.push(i); + for (var e = 0; e < this.CHANNEL_COLORS.length; e++) + this.dp_webgl.setChannelFlagAsColor(e, this.CHANNEL_COLORS[e]); + } + } + function r(t, i, e) { + (this.clipIDList = new Array()), + (this.clipIDList = e), + (this.clippingMaskDrawIndexList = new Array()); + for (var r = 0; r < e.length; r++) + this.clippingMaskDrawIndexList.push(i.getDrawDataIndex(e[r])); + (this.clippedDrawContextList = new Array()), + (this.isUsing = !0), + (this.layoutChannelNo = 0), + (this.layoutBounds = new S()), + (this.allClippedDrawRect = new S()), + (this.matrixForMask = new Float32Array(16)), + (this.matrixForDraw = new Float32Array(16)), + (this.owner = t); + } + function o(t, i) { + (this._$gP = t), (this.drawDataIndex = i); + } + function n() { + At || (this.color = null); + } + function s() { + At || + ((this._$dP = null), + (this._$eo = null), + (this._$V0 = null), + (this._$dP = 1e3), + (this._$eo = 1e3), + (this._$V0 = 1), + this._$a0()); + } + function _() {} + function a() { + (this._$r = null), (this._$0S = null); + } + function h() { + At || + ((this.x = null), + (this.y = null), + (this.width = null), + (this.height = null)); + } + function l(t) { + At || et.prototype.constructor.call(this, t); + } + function $() {} + function u(t) { + At || et.prototype.constructor.call(this, t); + } + function p() { + At || + ((this._$vo = null), + (this._$F2 = null), + (this._$ao = 400), + (this._$1S = 400), + p._$42++); + } + function f() { + At || + ((this.p1 = new c()), + (this.p2 = new c()), + (this._$Fo = 0), + (this._$Db = 0), + (this._$L2 = 0), + (this._$M2 = 0), + (this._$ks = 0), + (this._$9b = 0), + (this._$iP = 0), + (this._$iT = 0), + (this._$lL = new Array()), + (this._$qP = new Array()), + this.setup(0.3, 0.5, 0.1)); + } + function c() { + (this._$p = 1), + (this.x = 0), + (this.y = 0), + (this.vx = 0), + (this.vy = 0), + (this.ax = 0), + (this.ay = 0), + (this.fx = 0), + (this.fy = 0), + (this._$s0 = 0), + (this._$70 = 0), + (this._$7L = 0), + (this._$HL = 0); + } + function d(t, i, e) { + (this._$wL = null), + (this.scale = null), + (this._$V0 = null), + (this._$wL = t), + (this.scale = i), + (this._$V0 = e); + } + function g(t, i, e, r) { + d.prototype.constructor.call(this, i, e, r), + (this._$tL = null), + (this._$tL = t); + } + function y(t, i, e) { + (this._$wL = null), + (this.scale = null), + (this._$V0 = null), + (this._$wL = t), + (this.scale = i), + (this._$V0 = e); + } + function T(t, i, e, r) { + y.prototype.constructor.call(this, i, e, r), + (this._$YP = null), + (this._$YP = t); + } + function P() { + At || + ((this._$fL = 0), + (this._$gL = 0), + (this._$B0 = 1), + (this._$z0 = 1), + (this._$qT = 0), + (this.reflectX = !1), + (this.reflectY = !1)); + } + function S() { + At || + ((this.x = null), + (this.y = null), + (this.width = null), + (this.height = null)); + } + function v() {} + function L() { + At || ((this.x = null), (this.y = null)); + } + function M() { + At || + ((this._$gP = null), + (this._$dr = null), + (this._$GS = null), + (this._$qb = null), + (this._$Lb = null), + (this._$mS = null), + (this.clipID = null), + (this.clipIDList = new Array())); + } + function E() { + At || + ((this._$Eb = E._$ps), + (this._$lT = 1), + (this._$C0 = 1), + (this._$tT = 1), + (this._$WL = 1), + (this.culling = !1), + (this.matrix4x4 = new Float32Array(16)), + (this.premultipliedAlpha = !1), + (this.anisotropy = 0), + (this.clippingProcess = E.CLIPPING_PROCESS_NONE), + (this.clipBufPre_clipContextMask = null), + (this.clipBufPre_clipContextDraw = null), + (this.CHANNEL_COLORS = new Array())); + } + function A() { + At || + ((this.a = 1), + (this.r = 1), + (this.g = 1), + (this.b = 1), + (this.scale = 1), + (this._$ho = 1), + (this.blendMode = at.L2D_COLOR_BLEND_MODE_MULT)); + } + function I() { + At || + ((this._$kP = null), + (this._$dr = null), + (this._$Ai = !0), + (this._$mS = null)); + } + function w() {} + function x() { + At || + ((this._$VP = 0), + (this._$wL = null), + (this._$GP = null), + (this._$8o = x._$ds), + (this._$2r = -1), + (this._$O2 = 0), + (this._$ri = 0)); + } + function O() {} + function D() { + At || (this._$Ob = null); + } + function R() { + (this.m = new Float32Array(16)), this.identity(); + } + function b(t) { + At || et.prototype.constructor.call(this, t); + } + function F() { + At || + ((this._$7 = 1), + (this._$f = 0), + (this._$H = 0), + (this._$g = 1), + (this._$k = 0), + (this._$w = 0), + (this._$hi = STATE_IDENTITY), + (this._$Z = _$pS)); + } + function C() { + At || + (s.prototype.constructor.call(this), + (this.motions = new Array()), + (this._$7r = null), + (this._$7r = C._$Co++), + (this._$D0 = 30), + (this._$yT = 0), + (this._$E = !0), + (this.loopFadeIn = !0), + (this._$AS = -1), + _$a0()); + } + function N() { + (this._$P = new Float32Array(100)), (this.size = 0); + } + function B() { + (this._$4P = null), (this._$I0 = null), (this._$RP = null); + } + function U() {} + function G() {} + function Y(t) { + At || + ((this._$QT = !0), + (this._$co = -1), + (this._$qo = 0), + (this._$pb = new Array(Y._$is)), + (this._$_2 = new Float32Array(Y._$is)), + (this._$vr = new Float32Array(Y._$is)), + (this._$Rr = new Float32Array(Y._$is)), + (this._$Or = new Float32Array(Y._$is)), + (this._$fs = new Float32Array(Y._$is)), + (this._$Js = new Array(Y._$is)), + (this._$3S = new Array()), + (this._$aS = new Array()), + (this._$Bo = null), + (this._$F2 = new Array()), + (this._$db = new Array()), + (this._$8b = new Array()), + (this._$Hr = new Array()), + (this._$Ws = null), + (this._$Vs = null), + (this._$Er = null), + (this._$Es = new Int16Array(U._$Qb)), + (this._$ZP = new Float32Array(2 * U._$1r)), + (this._$Ri = t), + (this._$b0 = Y._$HP++), + (this.clipManager = null), + (this.dp_webgl = null)); + } + function k() {} + function V() { + At || + ((this._$12 = null), + (this._$bb = null), + (this._$_L = null), + (this._$jo = null), + (this._$iL = null), + (this._$0L = null), + (this._$Br = null), + (this._$Dr = null), + (this._$Cb = null), + (this._$mr = null), + (this._$_L = wt.STATE_FIRST), + (this._$Br = 4e3), + (this._$Dr = 100), + (this._$Cb = 50), + (this._$mr = 150), + (this._$jo = !0), + (this._$iL = "PARAM_EYE_L_OPEN"), + (this._$0L = "PARAM_EYE_R_OPEN")); + } + function X() { + At || + (E.prototype.constructor.call(this), + (this._$sb = new Int32Array(X._$As)), + (this._$U2 = new Array()), + (this.transform = null), + (this.gl = null), + null == X._$NT && + ((X._$NT = X._$9r(256)), + (X._$vS = X._$9r(256)), + (X._$no = X._$vb(256)))); + } + function z() { + At || + (I.prototype.constructor.call(this), + (this._$GS = null), + (this._$Y0 = null)); + } + function H(t) { + _t.prototype.constructor.call(this, t), + (this._$8r = I._$ur), + (this._$Yr = null), + (this._$Wr = null); + } + function W() { + At || + (M.prototype.constructor.call(this), + (this._$gP = null), + (this._$dr = null), + (this._$GS = null), + (this._$qb = null), + (this._$Lb = null), + (this._$mS = null)); + } + function j() { + At || + ((this._$NL = null), + (this._$3S = null), + (this._$aS = null), + j._$42++); + } + function q() { + At || (i.prototype.constructor.call(this), (this._$zo = new X())); + } + function J() { + At || + (s.prototype.constructor.call(this), + (this.motions = new Array()), + (this._$o2 = null), + (this._$7r = J._$Co++), + (this._$D0 = 30), + (this._$yT = 0), + (this._$E = !1), + (this.loopFadeIn = !0), + (this._$rr = -1), + (this._$eP = 0)); + } + function Q(t, i) { + return String.fromCharCode(t.getUint8(i)); + } + function N() { + (this._$P = new Float32Array(100)), (this.size = 0); + } + function B() { + (this._$4P = null), (this._$I0 = null), (this._$RP = null); + } + function Z() { + At || + (I.prototype.constructor.call(this), + (this._$o = 0), + (this._$A = 0), + (this._$GS = null), + (this._$Eo = null)); + } + function K(t) { + _t.prototype.constructor.call(this, t), + (this._$8r = I._$ur), + (this._$Cr = null), + (this._$hr = null); + } + function tt() { + At || + ((this.visible = !0), + (this._$g0 = !1), + (this._$NL = null), + (this._$3S = null), + (this._$aS = null), + tt._$42++); + } + function it(t) { + (this._$VS = null), (this._$e0 = null), (this._$e0 = t); + } + function et(t) { + At || (this.id = t); + } + function rt() {} + function ot() { + At || (this._$4S = null); + } + function nt(t, i) { + (this.canvas = t), + (this.context = i), + (this.viewport = new Array(0, 0, t.width, t.height)), + (this._$6r = 1), + (this._$xP = 0), + (this._$3r = 1), + (this._$uP = 0), + (this._$Qo = -1), + (this.cacheImages = {}); + } + function st() { + At || + ((this._$TT = null), + (this._$LT = null), + (this._$FS = null), + (this._$wL = null)); + } + function _t(t) { + At || + ((this._$e0 = null), + (this._$IP = null), + (this._$JS = !1), + (this._$AT = !0), + (this._$e0 = t), + (this.totalScale = 1), + (this._$7s = 1), + (this.totalOpacity = 1)); + } + function at() {} + function ht() {} + function lt(t) { + At || (this._$ib = t); + } + function $t() { + At || + (W.prototype.constructor.call(this), + (this._$LP = -1), + (this._$d0 = 0), + (this._$Yo = 0), + (this._$JP = null), + (this._$5P = null), + (this._$BP = null), + (this._$Eo = null), + (this._$Qi = null), + (this._$6s = $t._$ms), + (this.culling = !0), + (this.gl_cacheImage = null), + (this.instanceNo = $t._$42++)); + } + function ut(t) { + Mt.prototype.constructor.call(this, t), + (this._$8r = W._$ur), + (this._$Cr = null), + (this._$hr = null); + } + function pt() { + At || ((this.x = null), (this.y = null)); + } + function ft(t) { + At || + (i.prototype.constructor.call(this), + (this.drawParamWebGL = new mt(t)), + this.drawParamWebGL.setGL(at.getGL(t))); + } + function ct() { + At || + ((this.motions = null), + (this._$eb = !1), + (this.motions = new Array())); + } + function dt() { + (this._$w0 = null), + (this._$AT = !0), + (this._$9L = !1), + (this._$z2 = -1), + (this._$bs = -1), + (this._$Do = -1), + (this._$sr = null), + (this._$sr = dt._$Gs++); + } + function gt() { + this.m = new Array(1, 0, 0, 0, 1, 0, 0, 0, 1); + } + function yt(t) { + At || et.prototype.constructor.call(this, t); + } + function mt(t) { + At || + (E.prototype.constructor.call(this), + (this.textures = new Array()), + (this.transform = null), + (this.gl = null), + (this.glno = t), + (this.firstDraw = !0), + (this.anisotropyExt = null), + (this.maxAnisotropy = 0), + (this._$As = 32), + (this._$Gr = !1), + (this._$NT = null), + (this._$vS = null), + (this._$no = null), + (this.vertShader = null), + (this.fragShader = null), + (this.vertShaderOff = null), + (this.fragShaderOff = null)); + } + function Tt(t, i, e) { + return ( + null == i && (i = t.createBuffer()), + t.bindBuffer(t.ARRAY_BUFFER, i), + t.bufferData(t.ARRAY_BUFFER, e, t.DYNAMIC_DRAW), + i + ); + } + function Pt(t, i, e) { + return ( + null == i && (i = t.createBuffer()), + t.bindBuffer(t.ELEMENT_ARRAY_BUFFER, i), + t.bufferData(t.ELEMENT_ARRAY_BUFFER, e, t.DYNAMIC_DRAW), + i + ); + } + function St(t) { + At || + ((this._$P = new Int8Array(8)), + (this._$R0 = new DataView(this._$P.buffer)), + (this._$3i = new Int8Array(1e3)), + (this._$hL = 0), + (this._$v0 = 0), + (this._$S2 = 0), + (this._$Ko = new Array()), + (this._$T = t), + (this._$F = 0)); + } + function vt() {} + function Lt() {} + function Mt(t) { + At || + ((this._$e0 = null), + (this._$IP = null), + (this._$Us = null), + (this._$7s = null), + (this._$IS = [!1]), + (this._$VS = null), + (this._$AT = !0), + (this.baseOpacity = 1), + (this.clipBufPre_clipContext = null), + (this._$e0 = t)); + } + function Et() {} + var At = !0; + (i._$0s = 1), + (i._$4s = 2), + (i._$42 = 0), + (i._$62 = function (t, e) { + try { + if ( + (e instanceof ArrayBuffer && (e = new DataView(e)), + !(e instanceof DataView)) + ) + throw new lt( + "_$SS#loadModel(b) / b _$x be DataView or ArrayBuffer" + ); + var r, + o = new St(e), + n = o._$ST(), + s = o._$ST(), + a = o._$ST(); + if (109 != n || 111 != s || 99 != a) + throw new lt("_$gi _$C _$li , _$Q0 _$P0."); + if (((r = o._$ST()), o._$gr(r), r > G._$T7)) { + t._$NP |= i._$4s; + throw new lt( + "_$gi _$C _$li , _$n0 _$_ version _$li ( SDK : " + + G._$T7 + + " < _$f0 : " + + r + + " )@_$SS#loadModel()\n" + ); + } + var h = o._$nP(); + if (r >= G._$s7) { + var l = o._$9T(), + $ = o._$9T(); + if (-30584 != l || -30584 != $) + throw ( + ((t._$NP |= i._$0s), + new lt("_$gi _$C _$li , _$0 _$6 _$Ui.")) + ); + } + t._$KS(h); + var u = t.getModelContext(); + u.setDrawParam(t.getDrawParam()), u.init(); + } catch (t) { + _._$Rb(t); + } + }), + (i.prototype._$KS = function (t) { + this._$MT = t; + }), + (i.prototype.getModelImpl = function () { + return ( + null == this._$MT && ((this._$MT = new p()), this._$MT._$zP()), + this._$MT + ); + }), + (i.prototype.getCanvasWidth = function () { + return null == this._$MT ? 0 : this._$MT.getCanvasWidth(); + }), + (i.prototype.getCanvasHeight = function () { + return null == this._$MT ? 0 : this._$MT.getCanvasHeight(); + }), + (i.prototype.getParamFloat = function (t) { + return ( + "number" != typeof t && (t = this._$5S.getParamIndex(u.getID(t))), + this._$5S.getParamFloat(t) + ); + }), + (i.prototype.setParamFloat = function (t, i, e) { + "number" != typeof t && (t = this._$5S.getParamIndex(u.getID(t))), + arguments.length < 3 && (e = 1), + this._$5S.setParamFloat( + t, + this._$5S.getParamFloat(t) * (1 - e) + i * e + ); + }), + (i.prototype.addToParamFloat = function (t, i, e) { + "number" != typeof t && (t = this._$5S.getParamIndex(u.getID(t))), + arguments.length < 3 && (e = 1), + this._$5S.setParamFloat(t, this._$5S.getParamFloat(t) + i * e); + }), + (i.prototype.multParamFloat = function (t, i, e) { + "number" != typeof t && (t = this._$5S.getParamIndex(u.getID(t))), + arguments.length < 3 && (e = 1), + this._$5S.setParamFloat( + t, + this._$5S.getParamFloat(t) * (1 + (i - 1) * e) + ); + }), + (i.prototype.getParamIndex = function (t) { + return this._$5S.getParamIndex(u.getID(t)); + }), + (i.prototype.loadParam = function () { + this._$5S.loadParam(); + }), + (i.prototype.saveParam = function () { + this._$5S.saveParam(); + }), + (i.prototype.init = function () { + this._$5S.init(); + }), + (i.prototype.update = function () { + this._$5S.update(); + }), + (i.prototype._$Rs = function () { + return _._$li("_$60 _$PT _$Rs()"), -1; + }), + (i.prototype._$Ds = function (t) { + _._$li("_$60 _$PT _$SS#_$Ds() \n"); + }), + (i.prototype._$K2 = function () {}), + (i.prototype.draw = function () {}), + (i.prototype.getModelContext = function () { + return this._$5S; + }), + (i.prototype._$s2 = function () { + return this._$NP; + }), + (i.prototype._$P7 = function (t, i, e, r) { + var o = -1, + n = 0, + s = this; + if (0 != e) + if (1 == t.length) { + var _ = t[0], + a = 0 != s.getParamFloat(_), + h = i[0], + l = s.getPartsOpacity(h), + $ = e / r; + a ? (l += $) > 1 && (l = 1) : (l -= $) < 0 && (l = 0), + s.setPartsOpacity(h, l); + } else { + for (var u = 0; u < t.length; u++) { + var _ = t[u], + p = 0 != s.getParamFloat(_); + if (p) { + if (o >= 0) break; + o = u; + var h = i[u]; + (n = s.getPartsOpacity(h)), (n += e / r), n > 1 && (n = 1); + } + } + o < 0 && + (console.log("No _$wi _$q0/ _$U default[%s]", t[0]), + (o = 0), + (n = 1), + s.loadParam(), + s.setParamFloat(t[o], n), + s.saveParam()); + for (var u = 0; u < t.length; u++) { + var h = i[u]; + if (o == u) s.setPartsOpacity(h, n); + else { + var f, + c = s.getPartsOpacity(h); + f = n < 0.5 ? (-0.5 * n) / 0.5 + 1 : (0.5 * (1 - n)) / 0.5; + var d = (1 - f) * (1 - n); + d > 0.15 && (f = 1 - 0.15 / (1 - n)), + c > f && (c = f), + s.setPartsOpacity(h, c); + } + } + } + else + for (var u = 0; u < t.length; u++) { + var _ = t[u], + h = i[u], + p = 0 != s.getParamFloat(_); + s.setPartsOpacity(h, p ? 1 : 0); + } + }), + (i.prototype.setPartsOpacity = function (t, i) { + "number" != typeof t && + (t = this._$5S.getPartsDataIndex(l.getID(t))), + this._$5S.setPartsOpacity(t, i); + }), + (i.prototype.getPartsDataIndex = function (t) { + return ( + t instanceof l || (t = l.getID(t)), this._$5S.getPartsDataIndex(t) + ); + }), + (i.prototype.getPartsOpacity = function (t) { + return ( + "number" != typeof t && + (t = this._$5S.getPartsDataIndex(l.getID(t))), + t < 0 ? 0 : this._$5S.getPartsOpacity(t) + ); + }), + (i.prototype.getDrawParam = function () {}), + (i.prototype.getDrawDataIndex = function (t) { + return this._$5S.getDrawDataIndex(b.getID(t)); + }), + (i.prototype.getDrawData = function (t) { + return this._$5S.getDrawData(t); + }), + (i.prototype.getTransformedPoints = function (t) { + var i = this._$5S._$C2(t); + return i instanceof ut ? i.getTransformedPoints() : null; + }), + (i.prototype.getIndexArray = function (t) { + if (t < 0 || t >= this._$5S._$aS.length) return null; + var i = this._$5S._$aS[t]; + return null != i && i.getType() == W._$wb && i instanceof $t + ? i.getIndexArray() + : null; + }), + (e.CHANNEL_COUNT = 4), + (e.RENDER_TEXTURE_USE_MIPMAP = !1), + (e.NOT_USED_FRAME = -100), + (e.prototype._$L7 = function () { + if ( + (this.tmpModelToViewMatrix && (this.tmpModelToViewMatrix = null), + this.tmpMatrix2 && (this.tmpMatrix2 = null), + this.tmpMatrixForMask && (this.tmpMatrixForMask = null), + this.tmpMatrixForDraw && (this.tmpMatrixForDraw = null), + this.tmpBoundsOnModel && (this.tmpBoundsOnModel = null), + this.CHANNEL_COLORS) + ) { + for (var t = this.CHANNEL_COLORS.length - 1; t >= 0; --t) + this.CHANNEL_COLORS.splice(t, 1); + this.CHANNEL_COLORS = []; + } + this.releaseShader(); + }), + (e.prototype.releaseShader = function () { + for (var t = at.frameBuffers.length, i = 0; i < t; i++) + this.gl.deleteFramebuffer(at.frameBuffers[i].framebuffer); + (at.frameBuffers = []), (at.glContext = []); + }), + (e.prototype.init = function (t, i, e) { + for (var o = 0; o < i.length; o++) { + var n = i[o].getClipIDList(); + if (null != n) { + var s = this.findSameClip(n); + null == s && + ((s = new r(this, t, n)), this.clipContextList.push(s)); + var _ = i[o].getDrawDataID(), + a = t.getDrawDataIndex(_); + s.addClippedDrawData(_, a); + e[o].clipBufPre_clipContext = s; + } + } + }), + (e.prototype.getMaskRenderTexture = function () { + var t = null; + return ( + (t = this.dp_webgl.createFramebuffer()), + (at.frameBuffers[this.dp_webgl.glno] = t), + this.dp_webgl.glno + ); + }), + (e.prototype.setupClip = function (t, i) { + for (var e = 0, r = 0; r < this.clipContextList.length; r++) { + var o = this.clipContextList[r]; + this.calcClippedDrawTotalBounds(t, o), o.isUsing && e++; + } + if (e > 0) { + var n = i.gl.getParameter(i.gl.FRAMEBUFFER_BINDING), + s = new Array(4); + (s[0] = 0), + (s[1] = 0), + (s[2] = i.gl.canvas.width), + (s[3] = i.gl.canvas.height), + i.gl.viewport( + 0, + 0, + at.clippingMaskBufferSize, + at.clippingMaskBufferSize + ), + this.setupLayoutBounds(e), + i.gl.bindFramebuffer( + i.gl.FRAMEBUFFER, + at.frameBuffers[this.curFrameNo].framebuffer + ), + i.gl.clearColor(0, 0, 0, 0), + i.gl.clear(i.gl.COLOR_BUFFER_BIT); + for (var r = 0; r < this.clipContextList.length; r++) { + var o = this.clipContextList[r], + _ = o.allClippedDrawRect, + a = (o.layoutChannelNo, o.layoutBounds); + this.tmpBoundsOnModel._$jL(_), + this.tmpBoundsOnModel.expand(0.05 * _.width, 0.05 * _.height); + var h = a.width / this.tmpBoundsOnModel.width, + l = a.height / this.tmpBoundsOnModel.height; + this.tmpMatrix2.identity(), + this.tmpMatrix2.translate(-1, -1, 0), + this.tmpMatrix2.scale(2, 2, 1), + this.tmpMatrix2.translate(a.x, a.y, 0), + this.tmpMatrix2.scale(h, l, 1), + this.tmpMatrix2.translate( + -this.tmpBoundsOnModel.x, + -this.tmpBoundsOnModel.y, + 0 + ), + this.tmpMatrixForMask.setMatrix(this.tmpMatrix2.m), + this.tmpMatrix2.identity(), + this.tmpMatrix2.translate(a.x, a.y, 0), + this.tmpMatrix2.scale(h, l, 1), + this.tmpMatrix2.translate( + -this.tmpBoundsOnModel.x, + -this.tmpBoundsOnModel.y, + 0 + ), + this.tmpMatrixForDraw.setMatrix(this.tmpMatrix2.m); + for ( + var $ = this.tmpMatrixForMask.getArray(), u = 0; + u < 16; + u++ + ) + o.matrixForMask[u] = $[u]; + for ( + var p = this.tmpMatrixForDraw.getArray(), u = 0; + u < 16; + u++ + ) + o.matrixForDraw[u] = p[u]; + for ( + var f = o.clippingMaskDrawIndexList.length, c = 0; + c < f; + c++ + ) { + var d = o.clippingMaskDrawIndexList[c], + g = t.getDrawData(d), + y = t._$C2(d); + i.setClipBufPre_clipContextForMask(o), g.draw(i, t, y); + } + } + i.gl.bindFramebuffer(i.gl.FRAMEBUFFER, n), + i.setClipBufPre_clipContextForMask(null), + i.gl.viewport(s[0], s[1], s[2], s[3]); + } + }), + (e.prototype.getColorBuffer = function () { + return this.colorBuffer; + }), + (e.prototype.findSameClip = function (t) { + for (var i = 0; i < this.clipContextList.length; i++) { + var e = this.clipContextList[i], + r = e.clipIDList.length; + if (r == t.length) { + for (var o = 0, n = 0; n < r; n++) + for (var s = e.clipIDList[n], _ = 0; _ < r; _++) + if (t[_] == s) { + o++; + break; + } + if (o == r) return e; + } + } + return null; + }), + (e.prototype.calcClippedDrawTotalBounds = function (t, i) { + for ( + var e = t._$Ri.getModelImpl().getCanvasWidth(), + r = t._$Ri.getModelImpl().getCanvasHeight(), + o = e > r ? e : r, + n = o, + s = o, + _ = 0, + a = 0, + h = i.clippedDrawContextList.length, + l = 0; + l < h; + l++ + ) { + var $ = i.clippedDrawContextList[l], + u = $.drawDataIndex, + p = t._$C2(u); + if (p._$yo()) { + for ( + var f = p.getTransformedPoints(), + c = f.length, + d = [], + g = [], + y = 0, + m = U._$i2; + m < c; + m += U._$No + ) + (d[y] = f[m]), (g[y] = f[m + 1]), y++; + var T = Math.min.apply(null, d), + P = Math.min.apply(null, g), + S = Math.max.apply(null, d), + v = Math.max.apply(null, g); + T < n && (n = T), + P < s && (s = P), + S > _ && (_ = S), + v > a && (a = v); + } + } + if (n == o) + (i.allClippedDrawRect.x = 0), + (i.allClippedDrawRect.y = 0), + (i.allClippedDrawRect.width = 0), + (i.allClippedDrawRect.height = 0), + (i.isUsing = !1); + else { + var L = _ - n, + M = a - s; + (i.allClippedDrawRect.x = n), + (i.allClippedDrawRect.y = s), + (i.allClippedDrawRect.width = L), + (i.allClippedDrawRect.height = M), + (i.isUsing = !0); + } + }), + (e.prototype.setupLayoutBounds = function (t) { + var i = t / e.CHANNEL_COUNT, + r = t % e.CHANNEL_COUNT; + (i = ~~i), (r = ~~r); + for (var o = 0, n = 0; n < e.CHANNEL_COUNT; n++) { + var s = i + (n < r ? 1 : 0); + if (0 == s); + else if (1 == s) { + var a = this.clipContextList[o++]; + (a.layoutChannelNo = n), + (a.layoutBounds.x = 0), + (a.layoutBounds.y = 0), + (a.layoutBounds.width = 1), + (a.layoutBounds.height = 1); + } else if (2 == s) + for (var h = 0; h < s; h++) { + var l = h % 2, + $ = 0; + l = ~~l; + var a = this.clipContextList[o++]; + (a.layoutChannelNo = n), + (a.layoutBounds.x = 0.5 * l), + (a.layoutBounds.y = 0), + (a.layoutBounds.width = 0.5), + (a.layoutBounds.height = 1); + } + else if (s <= 4) + for (var h = 0; h < s; h++) { + var l = h % 2, + $ = h / 2; + (l = ~~l), ($ = ~~$); + var a = this.clipContextList[o++]; + (a.layoutChannelNo = n), + (a.layoutBounds.x = 0.5 * l), + (a.layoutBounds.y = 0.5 * $), + (a.layoutBounds.width = 0.5), + (a.layoutBounds.height = 0.5); + } + else if (s <= 9) + for (var h = 0; h < s; h++) { + var l = h % 3, + $ = h / 3; + (l = ~~l), ($ = ~~$); + var a = this.clipContextList[o++]; + (a.layoutChannelNo = n), + (a.layoutBounds.x = l / 3), + (a.layoutBounds.y = $ / 3), + (a.layoutBounds.width = 1 / 3), + (a.layoutBounds.height = 1 / 3); + } + else _._$li("_$6 _$0P mask count : %d", s); + } + }), + (r.prototype.addClippedDrawData = function (t, i) { + var e = new o(t, i); + this.clippedDrawContextList.push(e); + }), + (s._$JT = function (t, i, e) { + var r = t / i, + o = e / i, + n = o, + s = 1 - (1 - o) * (1 - o), + _ = 1 - (1 - n) * (1 - n), + a = + (1 / 3) * (1 - o) * s + + (n * (2 / 3) + (1 / 3) * (1 - n)) * (1 - s), + h = + (n + (2 / 3) * (1 - n)) * _ + + (o * (1 / 3) + (2 / 3) * (1 - o)) * (1 - _), + l = 1 - 3 * h + 3 * a - 0, + $ = 3 * h - 6 * a + 0, + u = 3 * a - 0; + if (r <= 0) return 0; + if (r >= 1) return 1; + var p = r, + f = p * p; + return l * (p * f) + $ * f + u * p + 0; + }), + (s.prototype._$a0 = function () {}), + (s.prototype.setFadeIn = function (t) { + this._$dP = t; + }), + (s.prototype.setFadeOut = function (t) { + this._$eo = t; + }), + (s.prototype._$pT = function (t) { + this._$V0 = t; + }), + (s.prototype.getFadeOut = function () { + return this._$eo; + }), + (s.prototype._$4T = function () { + return this._$eo; + }), + (s.prototype._$mT = function () { + return this._$V0; + }), + (s.prototype.getDurationMSec = function () { + return -1; + }), + (s.prototype.getLoopDurationMSec = function () { + return -1; + }), + (s.prototype.updateParam = function (t, i) { + if (i._$AT && !i._$9L) { + var e = w.getUserTimeMSec(); + if (i._$z2 < 0) { + (i._$z2 = e), (i._$bs = e); + var r = this.getDurationMSec(); + i._$Do < 0 && (i._$Do = r <= 0 ? -1 : i._$z2 + r); + } + var o = this._$V0; + (o = + o * + (0 == this._$dP ? 1 : ht._$r2((e - i._$bs) / this._$dP)) * + (0 == this._$eo || i._$Do < 0 + ? 1 + : ht._$r2((i._$Do - e) / this._$eo))), + (0 <= o && o <= 1) || console.log("### assert!! ### "), + this.updateParamExe(t, e, o, i), + i._$Do > 0 && i._$Do < e && (i._$9L = !0); + } + }), + (s.prototype.updateParamExe = function (t, i, e, r) {}), + (_._$8s = 0), + (_._$fT = new Object()), + (_.start = function (t) { + var i = _._$fT[t]; + null == i && ((i = new a()), (i._$r = t), (_._$fT[t] = i)), + (i._$0S = w.getSystemTimeMSec()); + }), + (_.dump = function (t) { + var i = _._$fT[t]; + if (null != i) { + var e = w.getSystemTimeMSec(), + r = e - i._$0S; + return console.log(t + " : " + r + "ms"), r; + } + return -1; + }), + (_.end = function (t) { + var i = _._$fT[t]; + if (null != i) { + return w.getSystemTimeMSec() - i._$0S; + } + return -1; + }), + (_._$li = function (t, i) { + console.log("_$li : " + t + "\n", i); + }), + (_._$Ji = function (t, i) { + console.log(t, i); + }), + (_._$dL = function (t, i) { + console.log(t, i), console.log("\n"); + }), + (_._$KL = function (t, i) { + for (var e = 0; e < i; e++) + e % 16 == 0 && e > 0 + ? console.log("\n") + : e % 8 == 0 && e > 0 && console.log(" "), + console.log("%02X ", 255 & t[e]); + console.log("\n"); + }), + (_._$nr = function (t, i, e) { + console.log("%s\n", t); + for (var r = i.length, o = 0; o < r; ++o) + console.log("%5d", i[o]), + console.log("%s\n", e), + console.log(","); + console.log("\n"); + }), + (_._$Rb = function (t) { + console.log("dump exception : " + t), + console.log("stack :: " + t.stack); + }), + (h.prototype._$8P = function () { + return 0.5 * (this.x + this.x + this.width); + }), + (h.prototype._$6P = function () { + return 0.5 * (this.y + this.y + this.height); + }), + (h.prototype._$EL = function () { + return this.x + this.width; + }), + (h.prototype._$5T = function () { + return this.y + this.height; + }), + (h.prototype._$jL = function (t, i, e, r) { + (this.x = t), (this.y = i), (this.width = e), (this.height = r); + }), + (h.prototype._$jL = function (t) { + (this.x = t.x), + (this.y = t.y), + (this.width = t.width), + (this.height = t.height); + }), + (l.prototype = new et()), + (l._$tP = new Object()), + (l._$27 = function () { + l._$tP.clear(); + }), + (l.getID = function (t) { + var i = l._$tP[t]; + return null == i && ((i = new l(t)), (l._$tP[t] = i)), i; + }), + (l.prototype._$3s = function () { + return new l(); + }), + (u.prototype = new et()), + (u._$tP = new Object()), + (u._$27 = function () { + u._$tP.clear(); + }), + (u.getID = function (t) { + var i = u._$tP[t]; + return null == i && ((i = new u(t)), (u._$tP[t] = i)), i; + }), + (u.prototype._$3s = function () { + return new u(); + }), + (p._$42 = 0), + (p.prototype._$zP = function () { + null == this._$vo && (this._$vo = new ot()), + null == this._$F2 && (this._$F2 = new Array()); + }), + (p.prototype.getCanvasWidth = function () { + return this._$ao; + }), + (p.prototype.getCanvasHeight = function () { + return this._$1S; + }), + (p.prototype._$F0 = function (t) { + (this._$vo = t._$nP()), + (this._$F2 = t._$nP()), + (this._$ao = t._$6L()), + (this._$1S = t._$6L()); + }), + (p.prototype._$6S = function (t) { + this._$F2.push(t); + }), + (p.prototype._$Xr = function () { + return this._$F2; + }), + (p.prototype._$E2 = function () { + return this._$vo; + }), + (f.prototype.setup = function (t, i, e) { + (this._$ks = this._$Yb()), + this.p2._$xT(), + 3 == arguments.length && + ((this._$Fo = t), + (this._$L2 = i), + (this.p1._$p = e), + (this.p2._$p = e), + (this.p2.y = t), + this.setup()); + }), + (f.prototype.getPhysicsPoint1 = function () { + return this.p1; + }), + (f.prototype.getPhysicsPoint2 = function () { + return this.p2; + }), + (f.prototype._$qr = function () { + return this._$Db; + }), + (f.prototype._$pr = function (t) { + this._$Db = t; + }), + (f.prototype._$5r = function () { + return this._$M2; + }), + (f.prototype._$Cs = function () { + return this._$9b; + }), + (f.prototype._$Yb = function () { + return ( + (-180 * + Math.atan2(this.p1.x - this.p2.x, -(this.p1.y - this.p2.y))) / + Math.PI + ); + }), + (f.prototype.addSrcParam = function (t, i, e, r) { + var o = new g(t, i, e, r); + this._$lL.push(o); + }), + (f.prototype.addTargetParam = function (t, i, e, r) { + var o = new T(t, i, e, r); + this._$qP.push(o); + }), + (f.prototype.update = function (t, i) { + if (0 == this._$iP) + return ( + (this._$iP = this._$iT = i), + void (this._$Fo = Math.sqrt( + (this.p1.x - this.p2.x) * (this.p1.x - this.p2.x) + + (this.p1.y - this.p2.y) * (this.p1.y - this.p2.y) + )) + ); + var e = (i - this._$iT) / 1e3; + if (0 != e) { + for (var r = this._$lL.length - 1; r >= 0; --r) { + this._$lL[r]._$oP(t, this); + } + this._$oo(t, e), + (this._$M2 = this._$Yb()), + (this._$9b = (this._$M2 - this._$ks) / e), + (this._$ks = this._$M2); + } + for (var r = this._$qP.length - 1; r >= 0; --r) { + this._$qP[r]._$YS(t, this); + } + this._$iT = i; + }), + (f.prototype._$oo = function (t, i) { + i < 0.033 && (i = 0.033); + var e = 1 / i; + (this.p1.vx = (this.p1.x - this.p1._$s0) * e), + (this.p1.vy = (this.p1.y - this.p1._$70) * e), + (this.p1.ax = (this.p1.vx - this.p1._$7L) * e), + (this.p1.ay = (this.p1.vy - this.p1._$HL) * e), + (this.p1.fx = this.p1.ax * this.p1._$p), + (this.p1.fy = this.p1.ay * this.p1._$p), + this.p1._$xT(); + var r, + o, + n = -Math.atan2(this.p1.y - this.p2.y, this.p1.x - this.p2.x), + s = Math.cos(n), + _ = Math.sin(n), + a = 9.8 * this.p2._$p, + h = this._$Db * Lt._$bS, + l = a * Math.cos(n - h); + (r = l * _), (o = l * s); + var $ = -this.p1.fx * _ * _, + u = -this.p1.fy * _ * s, + p = -this.p2.vx * this._$L2, + f = -this.p2.vy * this._$L2; + (this.p2.fx = r + $ + p), + (this.p2.fy = o + u + f), + (this.p2.ax = this.p2.fx / this.p2._$p), + (this.p2.ay = this.p2.fy / this.p2._$p), + (this.p2.vx += this.p2.ax * i), + (this.p2.vy += this.p2.ay * i), + (this.p2.x += this.p2.vx * i), + (this.p2.y += this.p2.vy * i); + var c = Math.sqrt( + (this.p1.x - this.p2.x) * (this.p1.x - this.p2.x) + + (this.p1.y - this.p2.y) * (this.p1.y - this.p2.y) + ); + (this.p2.x = this.p1.x + (this._$Fo * (this.p2.x - this.p1.x)) / c), + (this.p2.y = + this.p1.y + (this._$Fo * (this.p2.y - this.p1.y)) / c), + (this.p2.vx = (this.p2.x - this.p2._$s0) * e), + (this.p2.vy = (this.p2.y - this.p2._$70) * e), + this.p2._$xT(); + }), + (c.prototype._$xT = function () { + (this._$s0 = this.x), + (this._$70 = this.y), + (this._$7L = this.vx), + (this._$HL = this.vy); + }), + (d.prototype._$oP = function (t, i) {}), + (g.prototype = new d()), + (g.prototype._$oP = function (t, i) { + var e = this.scale * t.getParamFloat(this._$wL), + r = i.getPhysicsPoint1(); + switch (this._$tL) { + default: + case f.Src.SRC_TO_X: + r.x = r.x + (e - r.x) * this._$V0; + break; + case f.Src.SRC_TO_Y: + r.y = r.y + (e - r.y) * this._$V0; + break; + case f.Src.SRC_TO_G_ANGLE: + var o = i._$qr(); + (o += (e - o) * this._$V0), i._$pr(o); + } + }), + (y.prototype._$YS = function (t, i) {}), + (T.prototype = new y()), + (T.prototype._$YS = function (t, i) { + switch (this._$YP) { + default: + case f.Target.TARGET_FROM_ANGLE: + t.setParamFloat(this._$wL, this.scale * i._$5r(), this._$V0); + break; + case f.Target.TARGET_FROM_ANGLE_V: + t.setParamFloat(this._$wL, this.scale * i._$Cs(), this._$V0); + } + }), + (f.Src = function () {}), + (f.Src.SRC_TO_X = "SRC_TO_X"), + (f.Src.SRC_TO_Y = "SRC_TO_Y"), + (f.Src.SRC_TO_G_ANGLE = "SRC_TO_G_ANGLE"), + (f.Target = function () {}), + (f.Target.TARGET_FROM_ANGLE = "TARGET_FROM_ANGLE"), + (f.Target.TARGET_FROM_ANGLE_V = "TARGET_FROM_ANGLE_V"), + (P.prototype.init = function (t) { + (this._$fL = t._$fL), + (this._$gL = t._$gL), + (this._$B0 = t._$B0), + (this._$z0 = t._$z0), + (this._$qT = t._$qT), + (this.reflectX = t.reflectX), + (this.reflectY = t.reflectY); + }), + (P.prototype._$F0 = function (t) { + (this._$fL = t._$_T()), + (this._$gL = t._$_T()), + (this._$B0 = t._$_T()), + (this._$z0 = t._$_T()), + (this._$qT = t._$_T()), + t.getFormatVersion() >= G.LIVE2D_FORMAT_VERSION_V2_10_SDK2 && + ((this.reflectX = t._$po()), (this.reflectY = t._$po())); + }), + (P.prototype._$e = function () {}); + var It = function () {}; + (It._$ni = function (t, i, e, r, o, n, s, _, a) { + var h = s * n - _ * o; + if (0 == h) return null; + var l, + $ = ((t - e) * n - (i - r) * o) / h; + return ( + (l = 0 != o ? (t - e - $ * s) / o : (i - r - $ * _) / n), + isNaN(l) && + ((l = (t - e - $ * s) / o), + isNaN(l) && (l = (i - r - $ * _) / n), + isNaN(l) && + (console.log("a is NaN @UtVector#_$ni() "), + console.log("v1x : " + o), + console.log("v1x != 0 ? " + (0 != o)))), + null == a ? new Array(l, $) : ((a[0] = l), (a[1] = $), a) + ); + }), + (S.prototype._$8P = function () { + return this.x + 0.5 * this.width; + }), + (S.prototype._$6P = function () { + return this.y + 0.5 * this.height; + }), + (S.prototype._$EL = function () { + return this.x + this.width; + }), + (S.prototype._$5T = function () { + return this.y + this.height; + }), + (S.prototype._$jL = function (t, i, e, r) { + (this.x = t), (this.y = i), (this.width = e), (this.height = r); + }), + (S.prototype._$jL = function (t) { + (this.x = t.x), + (this.y = t.y), + (this.width = t.width), + (this.height = t.height); + }), + (S.prototype.contains = function (t, i) { + return ( + this.x <= this.x && + this.y <= this.y && + this.x <= this.x + this.width && + this.y <= this.y + this.height + ); + }), + (S.prototype.expand = function (t, i) { + (this.x -= t), + (this.y -= i), + (this.width += 2 * t), + (this.height += 2 * i); + }), + (v._$Z2 = function (t, i, e, r) { + var o = i._$Q2(t, e), + n = t._$vs(), + s = t._$Tr(); + if ((i._$zr(n, s, o), o <= 0)) return r[n[0]]; + if (1 == o) { + var _ = r[n[0]], + a = r[n[1]], + h = s[0]; + return (_ + (a - _) * h) | 0; + } + if (2 == o) { + var _ = r[n[0]], + a = r[n[1]], + l = r[n[2]], + $ = r[n[3]], + h = s[0], + u = s[1], + p = (_ + (a - _) * h) | 0, + f = (l + ($ - l) * h) | 0; + return (p + (f - p) * u) | 0; + } + if (3 == o) { + var c = r[n[0]], + d = r[n[1]], + g = r[n[2]], + y = r[n[3]], + m = r[n[4]], + T = r[n[5]], + P = r[n[6]], + S = r[n[7]], + h = s[0], + u = s[1], + v = s[2], + _ = (c + (d - c) * h) | 0, + a = (g + (y - g) * h) | 0, + l = (m + (T - m) * h) | 0, + $ = (P + (S - P) * h) | 0, + p = (_ + (a - _) * u) | 0, + f = (l + ($ - l) * u) | 0; + return (p + (f - p) * v) | 0; + } + if (4 == o) { + var L = r[n[0]], + M = r[n[1]], + E = r[n[2]], + A = r[n[3]], + I = r[n[4]], + w = r[n[5]], + x = r[n[6]], + O = r[n[7]], + D = r[n[8]], + R = r[n[9]], + b = r[n[10]], + F = r[n[11]], + C = r[n[12]], + N = r[n[13]], + B = r[n[14]], + U = r[n[15]], + h = s[0], + u = s[1], + v = s[2], + G = s[3], + c = (L + (M - L) * h) | 0, + d = (E + (A - E) * h) | 0, + g = (I + (w - I) * h) | 0, + y = (x + (O - x) * h) | 0, + m = (D + (R - D) * h) | 0, + T = (b + (F - b) * h) | 0, + P = (C + (N - C) * h) | 0, + S = (B + (U - B) * h) | 0, + _ = (c + (d - c) * u) | 0, + a = (g + (y - g) * u) | 0, + l = (m + (T - m) * u) | 0, + $ = (P + (S - P) * u) | 0, + p = (_ + (a - _) * v) | 0, + f = (l + ($ - l) * v) | 0; + return (p + (f - p) * G) | 0; + } + for (var Y = 1 << o, k = new Float32Array(Y), V = 0; V < Y; V++) { + for (var X = V, z = 1, H = 0; H < o; H++) + (z *= X % 2 == 0 ? 1 - s[H] : s[H]), (X /= 2); + k[V] = z; + } + for (var W = new Float32Array(Y), j = 0; j < Y; j++) W[j] = r[n[j]]; + for (var q = 0, j = 0; j < Y; j++) q += k[j] * W[j]; + return (q + 0.5) | 0; + }), + (v._$br = function (t, i, e, r) { + var o = i._$Q2(t, e), + n = t._$vs(), + s = t._$Tr(); + if ((i._$zr(n, s, o), o <= 0)) return r[n[0]]; + if (1 == o) { + var _ = r[n[0]], + a = r[n[1]], + h = s[0]; + return _ + (a - _) * h; + } + if (2 == o) { + var _ = r[n[0]], + a = r[n[1]], + l = r[n[2]], + $ = r[n[3]], + h = s[0], + u = s[1]; + return (1 - u) * (_ + (a - _) * h) + u * (l + ($ - l) * h); + } + if (3 == o) { + var p = r[n[0]], + f = r[n[1]], + c = r[n[2]], + d = r[n[3]], + g = r[n[4]], + y = r[n[5]], + m = r[n[6]], + T = r[n[7]], + h = s[0], + u = s[1], + P = s[2]; + return ( + (1 - P) * + ((1 - u) * (p + (f - p) * h) + u * (c + (d - c) * h)) + + P * ((1 - u) * (g + (y - g) * h) + u * (m + (T - m) * h)) + ); + } + if (4 == o) { + var S = r[n[0]], + v = r[n[1]], + L = r[n[2]], + M = r[n[3]], + E = r[n[4]], + A = r[n[5]], + I = r[n[6]], + w = r[n[7]], + x = r[n[8]], + O = r[n[9]], + D = r[n[10]], + R = r[n[11]], + b = r[n[12]], + F = r[n[13]], + C = r[n[14]], + N = r[n[15]], + h = s[0], + u = s[1], + P = s[2], + B = s[3]; + return ( + (1 - B) * + ((1 - P) * + ((1 - u) * (S + (v - S) * h) + u * (L + (M - L) * h)) + + P * ((1 - u) * (E + (A - E) * h) + u * (I + (w - I) * h))) + + B * + ((1 - P) * + ((1 - u) * (x + (O - x) * h) + u * (D + (R - D) * h)) + + P * ((1 - u) * (b + (F - b) * h) + u * (C + (N - C) * h))) + ); + } + for (var U = 1 << o, G = new Float32Array(U), Y = 0; Y < U; Y++) { + for (var k = Y, V = 1, X = 0; X < o; X++) + (V *= k % 2 == 0 ? 1 - s[X] : s[X]), (k /= 2); + G[Y] = V; + } + for (var z = new Float32Array(U), H = 0; H < U; H++) z[H] = r[n[H]]; + for (var W = 0, H = 0; H < U; H++) W += G[H] * z[H]; + return W; + }), + (v._$Vr = function (t, i, e, r, o, n, s, _) { + var a = i._$Q2(t, e), + h = t._$vs(), + l = t._$Tr(); + i._$zr(h, l, a); + var $ = 2 * r, + u = s; + if (a <= 0) { + var p = h[0], + f = o[p]; + if (2 == _ && 0 == s) w._$jT(f, 0, n, 0, $); + else + for (var c = 0; c < $; ) + (n[u] = f[c++]), (n[u + 1] = f[c++]), (u += _); + } else if (1 == a) + for ( + var f = o[h[0]], d = o[h[1]], g = l[0], y = 1 - g, c = 0; + c < $; + + ) + (n[u] = f[c] * y + d[c] * g), + ++c, + (n[u + 1] = f[c] * y + d[c] * g), + ++c, + (u += _); + else if (2 == a) + for ( + var f = o[h[0]], + d = o[h[1]], + m = o[h[2]], + T = o[h[3]], + g = l[0], + P = l[1], + y = 1 - g, + S = 1 - P, + v = S * y, + L = S * g, + M = P * y, + E = P * g, + c = 0; + c < $; + + ) + (n[u] = v * f[c] + L * d[c] + M * m[c] + E * T[c]), + ++c, + (n[u + 1] = v * f[c] + L * d[c] + M * m[c] + E * T[c]), + ++c, + (u += _); + else if (3 == a) + for ( + var A = o[h[0]], + I = o[h[1]], + x = o[h[2]], + O = o[h[3]], + D = o[h[4]], + R = o[h[5]], + b = o[h[6]], + F = o[h[7]], + g = l[0], + P = l[1], + C = l[2], + y = 1 - g, + S = 1 - P, + N = 1 - C, + B = N * S * y, + U = N * S * g, + G = N * P * y, + Y = N * P * g, + k = C * S * y, + V = C * S * g, + X = C * P * y, + z = C * P * g, + c = 0; + c < $; + + ) + (n[u] = + B * A[c] + + U * I[c] + + G * x[c] + + Y * O[c] + + k * D[c] + + V * R[c] + + X * b[c] + + z * F[c]), + ++c, + (n[u + 1] = + B * A[c] + + U * I[c] + + G * x[c] + + Y * O[c] + + k * D[c] + + V * R[c] + + X * b[c] + + z * F[c]), + ++c, + (u += _); + else if (4 == a) + for ( + var H = o[h[0]], + W = o[h[1]], + j = o[h[2]], + q = o[h[3]], + J = o[h[4]], + Q = o[h[5]], + Z = o[h[6]], + K = o[h[7]], + tt = o[h[8]], + it = o[h[9]], + et = o[h[10]], + rt = o[h[11]], + ot = o[h[12]], + nt = o[h[13]], + st = o[h[14]], + _t = o[h[15]], + g = l[0], + P = l[1], + C = l[2], + at = l[3], + y = 1 - g, + S = 1 - P, + N = 1 - C, + ht = 1 - at, + lt = ht * N * S * y, + $t = ht * N * S * g, + ut = ht * N * P * y, + pt = ht * N * P * g, + ft = ht * C * S * y, + ct = ht * C * S * g, + dt = ht * C * P * y, + gt = ht * C * P * g, + yt = at * N * S * y, + mt = at * N * S * g, + Tt = at * N * P * y, + Pt = at * N * P * g, + St = at * C * S * y, + vt = at * C * S * g, + Lt = at * C * P * y, + Mt = at * C * P * g, + c = 0; + c < $; + + ) + (n[u] = + lt * H[c] + + $t * W[c] + + ut * j[c] + + pt * q[c] + + ft * J[c] + + ct * Q[c] + + dt * Z[c] + + gt * K[c] + + yt * tt[c] + + mt * it[c] + + Tt * et[c] + + Pt * rt[c] + + St * ot[c] + + vt * nt[c] + + Lt * st[c] + + Mt * _t[c]), + ++c, + (n[u + 1] = + lt * H[c] + + $t * W[c] + + ut * j[c] + + pt * q[c] + + ft * J[c] + + ct * Q[c] + + dt * Z[c] + + gt * K[c] + + yt * tt[c] + + mt * it[c] + + Tt * et[c] + + Pt * rt[c] + + St * ot[c] + + vt * nt[c] + + Lt * st[c] + + Mt * _t[c]), + ++c, + (u += _); + else { + for ( + var Et = 1 << a, At = new Float32Array(Et), It = 0; + It < Et; + It++ + ) { + for (var wt = It, xt = 1, Ot = 0; Ot < a; Ot++) + (xt *= wt % 2 == 0 ? 1 - l[Ot] : l[Ot]), (wt /= 2); + At[It] = xt; + } + for (var Dt = new Float32Array(Et), Rt = 0; Rt < Et; Rt++) + Dt[Rt] = o[h[Rt]]; + for (var c = 0; c < $; ) { + for (var bt = 0, Ft = 0, Ct = c + 1, Rt = 0; Rt < Et; Rt++) + (bt += At[Rt] * Dt[Rt][c]), (Ft += At[Rt] * Dt[Rt][Ct]); + (c += 2), (n[u] = bt), (n[u + 1] = Ft), (u += _); + } + } + }), + (L.prototype._$HT = function (t, i) { + (this.x = t), (this.y = i); + }), + (L.prototype._$HT = function (t) { + (this.x = t.x), (this.y = t.y); + }), + (M._$ur = -2), + (M._$ES = 500), + (M._$wb = 2), + (M._$8S = 3), + (M._$52 = M._$ES), + (M._$R2 = M._$ES), + (M._$or = function () { + return M._$52; + }), + (M._$Pr = function () { + return M._$R2; + }), + (M.prototype.convertClipIDForV2_11 = function (t) { + var i = []; + return null == t + ? null + : 0 == t.length + ? null + : /,/.test(t) + ? (i = t.id.split(",")) + : (i.push(t.id), i); + }), + (M.prototype._$F0 = function (t) { + (this._$gP = t._$nP()), + (this._$dr = t._$nP()), + (this._$GS = t._$nP()), + (this._$qb = t._$6L()), + (this._$Lb = t._$cS()), + (this._$mS = t._$Tb()), + t.getFormatVersion() >= G._$T7 + ? ((this.clipID = t._$nP()), + (this.clipIDList = this.convertClipIDForV2_11(this.clipID))) + : (this.clipIDList = []), + this._$MS(this._$Lb); + }), + (M.prototype.getClipIDList = function () { + return this.clipIDList; + }), + (M.prototype.init = function (t) {}), + (M.prototype._$Nr = function (t, i) { + if ( + ((i._$IS[0] = !1), + (i._$Us = v._$Z2(t, this._$GS, i._$IS, this._$Lb)), + at._$Zs) + ); + else if (i._$IS[0]) return; + i._$7s = v._$br(t, this._$GS, i._$IS, this._$mS); + }), + (M.prototype._$2b = function (t, i) {}), + (M.prototype.getDrawDataID = function () { + return this._$gP; + }), + (M.prototype._$j2 = function (t) { + this._$gP = t; + }), + (M.prototype.getOpacity = function (t, i) { + return i._$7s; + }), + (M.prototype._$zS = function (t, i) { + return i._$Us; + }), + (M.prototype._$MS = function (t) { + for (var i = t.length - 1; i >= 0; --i) { + var e = t[i]; + e < M._$52 ? (M._$52 = e) : e > M._$R2 && (M._$R2 = e); + } + }), + (M.prototype.getTargetBaseDataID = function () { + return this._$dr; + }), + (M.prototype._$gs = function (t) { + this._$dr = t; + }), + (M.prototype._$32 = function () { + return null != this._$dr && this._$dr != yt._$2o(); + }), + (M.prototype.preDraw = function (t, i, e) {}), + (M.prototype.draw = function (t, i, e) {}), + (M.prototype.getType = function () {}), + (M.prototype._$B2 = function (t, i, e) {}), + (E._$ps = 32), + (E.CLIPPING_PROCESS_NONE = 0), + (E.CLIPPING_PROCESS_OVERWRITE_ALPHA = 1), + (E.CLIPPING_PROCESS_MULTIPLY_ALPHA = 2), + (E.CLIPPING_PROCESS_DRAW = 3), + (E.CLIPPING_PROCESS_CLEAR_ALPHA = 4), + (E.prototype.setChannelFlagAsColor = function (t, i) { + this.CHANNEL_COLORS[t] = i; + }), + (E.prototype.getChannelFlagAsColor = function (t) { + return this.CHANNEL_COLORS[t]; + }), + (E.prototype._$ZT = function () {}), + (E.prototype._$Uo = function (t, i, e, r, o, n, s) {}), + (E.prototype._$Rs = function () { + return -1; + }), + (E.prototype._$Ds = function (t) {}), + (E.prototype.setBaseColor = function (t, i, e, r) { + t < 0 ? (t = 0) : t > 1 && (t = 1), + i < 0 ? (i = 0) : i > 1 && (i = 1), + e < 0 ? (e = 0) : e > 1 && (e = 1), + r < 0 ? (r = 0) : r > 1 && (r = 1), + (this._$lT = t), + (this._$C0 = i), + (this._$tT = e), + (this._$WL = r); + }), + (E.prototype._$WP = function (t) { + this.culling = t; + }), + (E.prototype.setMatrix = function (t) { + for (var i = 0; i < 16; i++) this.matrix4x4[i] = t[i]; + }), + (E.prototype._$IT = function () { + return this.matrix4x4; + }), + (E.prototype.setPremultipliedAlpha = function (t) { + this.premultipliedAlpha = t; + }), + (E.prototype.isPremultipliedAlpha = function () { + return this.premultipliedAlpha; + }), + (E.prototype.setAnisotropy = function (t) { + this.anisotropy = t; + }), + (E.prototype.getAnisotropy = function () { + return this.anisotropy; + }), + (E.prototype.getClippingProcess = function () { + return this.clippingProcess; + }), + (E.prototype.setClippingProcess = function (t) { + this.clippingProcess = t; + }), + (E.prototype.setClipBufPre_clipContextForMask = function (t) { + this.clipBufPre_clipContextMask = t; + }), + (E.prototype.getClipBufPre_clipContextMask = function () { + return this.clipBufPre_clipContextMask; + }), + (E.prototype.setClipBufPre_clipContextForDraw = function (t) { + this.clipBufPre_clipContextDraw = t; + }), + (E.prototype.getClipBufPre_clipContextDraw = function () { + return this.clipBufPre_clipContextDraw; + }), + (I._$ur = -2), + (I._$c2 = 1), + (I._$_b = 2), + (I.prototype._$F0 = function (t) { + (this._$kP = t._$nP()), (this._$dr = t._$nP()); + }), + (I.prototype.readV2_opacity = function (t) { + t.getFormatVersion() >= G.LIVE2D_FORMAT_VERSION_V2_10_SDK2 && + (this._$mS = t._$Tb()); + }), + (I.prototype.init = function (t) {}), + (I.prototype._$Nr = function (t, i) {}), + (I.prototype.interpolateOpacity = function (t, i, e, r) { + null == this._$mS + ? e.setInterpolatedOpacity(1) + : e.setInterpolatedOpacity(v._$br(t, i, r, this._$mS)); + }), + (I.prototype._$2b = function (t, i) {}), + (I.prototype._$nb = function (t, i, e, r, o, n, s) {}), + (I.prototype.getType = function () {}), + (I.prototype._$gs = function (t) { + this._$dr = t; + }), + (I.prototype._$a2 = function (t) { + this._$kP = t; + }), + (I.prototype.getTargetBaseDataID = function () { + return this._$dr; + }), + (I.prototype.getBaseDataID = function () { + return this._$kP; + }), + (I.prototype._$32 = function () { + return null != this._$dr && this._$dr != yt._$2o(); + }), + (w._$W2 = 0), + (w._$CS = w._$W2), + (w._$Mo = function () { + return !0; + }), + (w._$XP = function (t) { + try { + for (var i = getTimeMSec(); getTimeMSec() - i < t; ); + } catch (t) { + t._$Rb(); + } + }), + (w.getUserTimeMSec = function () { + return w._$CS == w._$W2 ? w.getSystemTimeMSec() : w._$CS; + }), + (w.setUserTimeMSec = function (t) { + w._$CS = t; + }), + (w.updateUserTimeMSec = function () { + return (w._$CS = w.getSystemTimeMSec()); + }), + (w.getTimeMSec = function () { + return new Date().getTime(); + }), + (w.getSystemTimeMSec = function () { + return new Date().getTime(); + }), + (w._$Q = function (t) {}), + (w._$jT = function (t, i, e, r, o) { + for (var n = 0; n < o; n++) e[r + n] = t[i + n]; + }), + (x._$ds = -2), + (x.prototype._$F0 = function (t) { + (this._$wL = t._$nP()), + (this._$VP = t._$6L()), + (this._$GP = t._$nP()); + }), + (x.prototype.getParamIndex = function (t) { + return this._$2r != t && (this._$8o = x._$ds), this._$8o; + }), + (x.prototype._$Pb = function (t, i) { + (this._$8o = t), (this._$2r = i); + }), + (x.prototype.getParamID = function () { + return this._$wL; + }), + (x.prototype._$yP = function (t) { + this._$wL = t; + }), + (x.prototype._$N2 = function () { + return this._$VP; + }), + (x.prototype._$d2 = function () { + return this._$GP; + }), + (x.prototype._$t2 = function (t, i) { + (this._$VP = t), (this._$GP = i); + }), + (x.prototype._$Lr = function () { + return this._$O2; + }), + (x.prototype._$wr = function (t) { + this._$O2 = t; + }), + (x.prototype._$SL = function () { + return this._$ri; + }), + (x.prototype._$AL = function (t) { + this._$ri = t; + }), + (O.startsWith = function (t, i, e) { + var r = i + e.length; + if (r >= t.length) return !1; + for (var o = i; o < r; o++) + if (O.getChar(t, o) != e.charAt(o - i)) return !1; + return !0; + }), + (O.getChar = function (t, i) { + return String.fromCharCode(t.getUint8(i)); + }), + (O.createString = function (t, i, e) { + for ( + var r = new ArrayBuffer(2 * e), o = new Uint16Array(r), n = 0; + n < e; + n++ + ) + o[n] = t.getUint8(i + n); + return String.fromCharCode.apply(null, o); + }), + (O._$LS = function (t, i, e, r) { + t instanceof ArrayBuffer && (t = new DataView(t)); + var o = e, + n = !1, + s = !1, + _ = 0, + a = O.getChar(t, o); + "-" == a && ((n = !0), o++); + for (var h = !1; o < i; o++) { + switch ((a = O.getChar(t, o))) { + case "0": + _ *= 10; + break; + case "1": + _ = 10 * _ + 1; + break; + case "2": + _ = 10 * _ + 2; + break; + case "3": + _ = 10 * _ + 3; + break; + case "4": + _ = 10 * _ + 4; + break; + case "5": + _ = 10 * _ + 5; + break; + case "6": + _ = 10 * _ + 6; + break; + case "7": + _ = 10 * _ + 7; + break; + case "8": + _ = 10 * _ + 8; + break; + case "9": + _ = 10 * _ + 9; + break; + case ".": + (s = !0), o++, (h = !0); + break; + default: + h = !0; + } + if (h) break; + } + if (s) + for (var l = 0.1, $ = !1; o < i; o++) { + switch ((a = O.getChar(t, o))) { + case "0": + break; + case "1": + _ += 1 * l; + break; + case "2": + _ += 2 * l; + break; + case "3": + _ += 3 * l; + break; + case "4": + _ += 4 * l; + break; + case "5": + _ += 5 * l; + break; + case "6": + _ += 6 * l; + break; + case "7": + _ += 7 * l; + break; + case "8": + _ += 8 * l; + break; + case "9": + _ += 9 * l; + break; + default: + $ = !0; + } + if (((l *= 0.1), $)) break; + } + return n && (_ = -_), (r[0] = o), _; + }), + (D.prototype._$zP = function () { + this._$Ob = new Array(); + }), + (D.prototype._$F0 = function (t) { + this._$Ob = t._$nP(); + }), + (D.prototype._$Ur = function (t) { + if (t._$WS()) return !0; + for (var i = t._$v2(), e = this._$Ob.length - 1; e >= 0; --e) { + var r = this._$Ob[e].getParamIndex(i); + if ( + (r == x._$ds && + (r = t.getParamIndex(this._$Ob[e].getParamID())), + t._$Xb(r)) + ) + return !0; + } + return !1; + }), + (D.prototype._$Q2 = function (t, i) { + for ( + var e, r, o = this._$Ob.length, n = t._$v2(), s = 0, _ = 0; + _ < o; + _++ + ) { + var a = this._$Ob[_]; + if ( + ((e = a.getParamIndex(n)), + e == x._$ds && + ((e = t.getParamIndex(a.getParamID())), a._$Pb(e, n)), + e < 0) + ) + throw new Exception("err 23242 : " + a.getParamID()); + var h = e < 0 ? 0 : t.getParamFloat(e); + r = a._$N2(); + var l, + $, + u = a._$d2(), + p = -1, + f = 0; + if (r < 1); + else if (1 == r) + (l = u[0]), + l - U._$J < h && h < l + U._$J + ? ((p = 0), (f = 0)) + : ((p = 0), (i[0] = !0)); + else if (((l = u[0]), h < l - U._$J)) (p = 0), (i[0] = !0); + else if (h < l + U._$J) p = 0; + else { + for (var c = !1, d = 1; d < r; ++d) { + if ((($ = u[d]), h < $ + U._$J)) { + $ - U._$J < h + ? (p = d) + : ((p = d - 1), (f = (h - l) / ($ - l)), s++), + (c = !0); + break; + } + l = $; + } + c || ((p = r - 1), (f = 0), (i[0] = !0)); + } + a._$wr(p), a._$AL(f); + } + return s; + }), + (D.prototype._$zr = function (t, i, e) { + var r = 1 << e; + r + 1 > U._$Qb && console.log("err 23245\n"); + for ( + var o = this._$Ob.length, n = 1, s = 1, _ = 0, a = 0; + a < r; + ++a + ) + t[a] = 0; + for (var h = 0; h < o; ++h) { + var l = this._$Ob[h]; + if (0 == l._$SL()) { + var $ = l._$Lr() * n; + if ($ < 0 && at._$3T) throw new Exception("err 23246"); + for (var a = 0; a < r; ++a) t[a] += $; + } else { + for ( + var $ = n * l._$Lr(), u = n * (l._$Lr() + 1), a = 0; + a < r; + ++a + ) + t[a] += ((a / s) | 0) % 2 == 0 ? $ : u; + (i[_++] = l._$SL()), (s *= 2); + } + n *= l._$N2(); + } + (t[r] = 65535), (i[_] = -1); + }), + (D.prototype._$h2 = function (t, i, e) { + for (var r = new Float32Array(i), o = 0; o < i; ++o) r[o] = e[o]; + var n = new x(); + n._$yP(t), n._$t2(i, r), this._$Ob.push(n); + }), + (D.prototype._$J2 = function (t) { + for (var i = t, e = this._$Ob.length, r = 0; r < e; ++r) { + var o = this._$Ob[r], + n = o._$N2(), + s = i % o._$N2(), + _ = o._$d2()[s]; + console.log("%s[%d]=%7.2f / ", o.getParamID(), s, _), (i /= n); + } + console.log("\n"); + }), + (D.prototype.getParamCount = function () { + return this._$Ob.length; + }), + (D.prototype._$zs = function () { + return this._$Ob; + }), + (R.prototype.identity = function () { + for (var t = 0; t < 16; t++) this.m[t] = t % 5 == 0 ? 1 : 0; + }), + (R.prototype.getArray = function () { + return this.m; + }), + (R.prototype.getCopyMatrix = function () { + return new Float32Array(this.m); + }), + (R.prototype.setMatrix = function (t) { + if (null != t && 16 == t.length) + for (var i = 0; i < 16; i++) this.m[i] = t[i]; + }), + (R.prototype.mult = function (t, i, e) { + return null == i + ? null + : (this == i + ? this.mult_safe(this.m, t.m, i.m, e) + : this.mult_fast(this.m, t.m, i.m, e), + i); + }), + (R.prototype.mult_safe = function (t, i, e, r) { + if (t == e) { + var o = new Array(16); + this.mult_fast(t, i, o, r); + for (var n = 15; n >= 0; --n) e[n] = o[n]; + } else this.mult_fast(t, i, e, r); + }), + (R.prototype.mult_fast = function (t, i, e, r) { + r + ? ((e[0] = t[0] * i[0] + t[4] * i[1] + t[8] * i[2]), + (e[4] = t[0] * i[4] + t[4] * i[5] + t[8] * i[6]), + (e[8] = t[0] * i[8] + t[4] * i[9] + t[8] * i[10]), + (e[12] = t[0] * i[12] + t[4] * i[13] + t[8] * i[14] + t[12]), + (e[1] = t[1] * i[0] + t[5] * i[1] + t[9] * i[2]), + (e[5] = t[1] * i[4] + t[5] * i[5] + t[9] * i[6]), + (e[9] = t[1] * i[8] + t[5] * i[9] + t[9] * i[10]), + (e[13] = t[1] * i[12] + t[5] * i[13] + t[9] * i[14] + t[13]), + (e[2] = t[2] * i[0] + t[6] * i[1] + t[10] * i[2]), + (e[6] = t[2] * i[4] + t[6] * i[5] + t[10] * i[6]), + (e[10] = t[2] * i[8] + t[6] * i[9] + t[10] * i[10]), + (e[14] = t[2] * i[12] + t[6] * i[13] + t[10] * i[14] + t[14]), + (e[3] = e[7] = e[11] = 0), + (e[15] = 1)) + : ((e[0] = + t[0] * i[0] + t[4] * i[1] + t[8] * i[2] + t[12] * i[3]), + (e[4] = t[0] * i[4] + t[4] * i[5] + t[8] * i[6] + t[12] * i[7]), + (e[8] = + t[0] * i[8] + t[4] * i[9] + t[8] * i[10] + t[12] * i[11]), + (e[12] = + t[0] * i[12] + t[4] * i[13] + t[8] * i[14] + t[12] * i[15]), + (e[1] = t[1] * i[0] + t[5] * i[1] + t[9] * i[2] + t[13] * i[3]), + (e[5] = t[1] * i[4] + t[5] * i[5] + t[9] * i[6] + t[13] * i[7]), + (e[9] = + t[1] * i[8] + t[5] * i[9] + t[9] * i[10] + t[13] * i[11]), + (e[13] = + t[1] * i[12] + t[5] * i[13] + t[9] * i[14] + t[13] * i[15]), + (e[2] = + t[2] * i[0] + t[6] * i[1] + t[10] * i[2] + t[14] * i[3]), + (e[6] = + t[2] * i[4] + t[6] * i[5] + t[10] * i[6] + t[14] * i[7]), + (e[10] = + t[2] * i[8] + t[6] * i[9] + t[10] * i[10] + t[14] * i[11]), + (e[14] = + t[2] * i[12] + t[6] * i[13] + t[10] * i[14] + t[14] * i[15]), + (e[3] = + t[3] * i[0] + t[7] * i[1] + t[11] * i[2] + t[15] * i[3]), + (e[7] = + t[3] * i[4] + t[7] * i[5] + t[11] * i[6] + t[15] * i[7]), + (e[11] = + t[3] * i[8] + t[7] * i[9] + t[11] * i[10] + t[15] * i[11]), + (e[15] = + t[3] * i[12] + t[7] * i[13] + t[11] * i[14] + t[15] * i[15])); + }), + (R.prototype.translate = function (t, i, e) { + (this.m[12] = + this.m[0] * t + this.m[4] * i + this.m[8] * e + this.m[12]), + (this.m[13] = + this.m[1] * t + this.m[5] * i + this.m[9] * e + this.m[13]), + (this.m[14] = + this.m[2] * t + this.m[6] * i + this.m[10] * e + this.m[14]), + (this.m[15] = + this.m[3] * t + this.m[7] * i + this.m[11] * e + this.m[15]); + }), + (R.prototype.scale = function (t, i, e) { + (this.m[0] *= t), + (this.m[4] *= i), + (this.m[8] *= e), + (this.m[1] *= t), + (this.m[5] *= i), + (this.m[9] *= e), + (this.m[2] *= t), + (this.m[6] *= i), + (this.m[10] *= e), + (this.m[3] *= t), + (this.m[7] *= i), + (this.m[11] *= e); + }), + (R.prototype.rotateX = function (t) { + var i = Lt.fcos(t), + e = Lt._$9(t), + r = this.m[4]; + (this.m[4] = r * i + this.m[8] * e), + (this.m[8] = r * -e + this.m[8] * i), + (r = this.m[5]), + (this.m[5] = r * i + this.m[9] * e), + (this.m[9] = r * -e + this.m[9] * i), + (r = this.m[6]), + (this.m[6] = r * i + this.m[10] * e), + (this.m[10] = r * -e + this.m[10] * i), + (r = this.m[7]), + (this.m[7] = r * i + this.m[11] * e), + (this.m[11] = r * -e + this.m[11] * i); + }), + (R.prototype.rotateY = function (t) { + var i = Lt.fcos(t), + e = Lt._$9(t), + r = this.m[0]; + (this.m[0] = r * i + this.m[8] * -e), + (this.m[8] = r * e + this.m[8] * i), + (r = this.m[1]), + (this.m[1] = r * i + this.m[9] * -e), + (this.m[9] = r * e + this.m[9] * i), + (r = m[2]), + (this.m[2] = r * i + this.m[10] * -e), + (this.m[10] = r * e + this.m[10] * i), + (r = m[3]), + (this.m[3] = r * i + this.m[11] * -e), + (this.m[11] = r * e + this.m[11] * i); + }), + (R.prototype.rotateZ = function (t) { + var i = Lt.fcos(t), + e = Lt._$9(t), + r = this.m[0]; + (this.m[0] = r * i + this.m[4] * e), + (this.m[4] = r * -e + this.m[4] * i), + (r = this.m[1]), + (this.m[1] = r * i + this.m[5] * e), + (this.m[5] = r * -e + this.m[5] * i), + (r = this.m[2]), + (this.m[2] = r * i + this.m[6] * e), + (this.m[6] = r * -e + this.m[6] * i), + (r = this.m[3]), + (this.m[3] = r * i + this.m[7] * e), + (this.m[7] = r * -e + this.m[7] * i); + }), + (b.prototype = new et()), + (b._$tP = new Object()), + (b._$27 = function () { + b._$tP.clear(); + }), + (b.getID = function (t) { + var i = b._$tP[t]; + return null == i && ((i = new b(t)), (b._$tP[t] = i)), i; + }), + (b.prototype._$3s = function () { + return new b(); + }), + (F._$kS = -1), + (F._$pS = 0), + (F._$hb = 1), + (F.STATE_IDENTITY = 0), + (F._$gb = 1), + (F._$fo = 2), + (F._$go = 4), + (F.prototype.transform = function (t, i, e) { + var r, + o, + n, + s, + _, + a, + h = 0, + l = 0; + switch (this._$hi) { + default: + return; + case F._$go | F._$fo | F._$gb: + for ( + r = this._$7, + o = this._$H, + n = this._$k, + s = this._$f, + _ = this._$g, + a = this._$w; + --e >= 0; + + ) { + var $ = t[h++], + u = t[h++]; + (i[l++] = r * $ + o * u + n), (i[l++] = s * $ + _ * u + a); + } + return; + case F._$go | F._$fo: + for ( + r = this._$7, o = this._$H, s = this._$f, _ = this._$g; + --e >= 0; + + ) { + var $ = t[h++], + u = t[h++]; + (i[l++] = r * $ + o * u), (i[l++] = s * $ + _ * u); + } + return; + case F._$go | F._$gb: + for ( + o = this._$H, n = this._$k, s = this._$f, a = this._$w; + --e >= 0; + + ) { + var $ = t[h++]; + (i[l++] = o * t[h++] + n), (i[l++] = s * $ + a); + } + return; + case F._$go: + for (o = this._$H, s = this._$f; --e >= 0; ) { + var $ = t[h++]; + (i[l++] = o * t[h++]), (i[l++] = s * $); + } + return; + case F._$fo | F._$gb: + for ( + r = this._$7, n = this._$k, _ = this._$g, a = this._$w; + --e >= 0; + + ) + (i[l++] = r * t[h++] + n), (i[l++] = _ * t[h++] + a); + return; + case F._$fo: + for (r = this._$7, _ = this._$g; --e >= 0; ) + (i[l++] = r * t[h++]), (i[l++] = _ * t[h++]); + return; + case F._$gb: + for (n = this._$k, a = this._$w; --e >= 0; ) + (i[l++] = t[h++] + n), (i[l++] = t[h++] + a); + return; + case F.STATE_IDENTITY: + return void ((t == i && h == l) || w._$jT(t, h, i, l, 2 * e)); + } + }), + (F.prototype.update = function () { + 0 == this._$H && 0 == this._$f + ? 1 == this._$7 && 1 == this._$g + ? 0 == this._$k && 0 == this._$w + ? ((this._$hi = F.STATE_IDENTITY), (this._$Z = F._$pS)) + : ((this._$hi = F._$gb), (this._$Z = F._$hb)) + : 0 == this._$k && 0 == this._$w + ? ((this._$hi = F._$fo), (this._$Z = F._$kS)) + : ((this._$hi = F._$fo | F._$gb), (this._$Z = F._$kS)) + : 0 == this._$7 && 0 == this._$g + ? 0 == this._$k && 0 == this._$w + ? ((this._$hi = F._$go), (this._$Z = F._$kS)) + : ((this._$hi = F._$go | F._$gb), (this._$Z = F._$kS)) + : 0 == this._$k && 0 == this._$w + ? ((this._$hi = F._$go | F._$fo), (this._$Z = F._$kS)) + : ((this._$hi = F._$go | F._$fo | F._$gb), (this._$Z = F._$kS)); + }), + (F.prototype._$RT = function (t) { + this._$IT(t); + var i = t[0], + e = t[2], + r = t[1], + o = t[3], + n = Math.sqrt(i * i + r * r), + s = i * o - e * r; + 0 == n + ? at._$so && console.log("affine._$RT() / rt==0") + : ((t[0] = n), + (t[1] = s / n), + (t[2] = (r * o + i * e) / s), + (t[3] = Math.atan2(r, i))); + }), + (F.prototype._$ho = function (t, i, e, r) { + var o = new Float32Array(6), + n = new Float32Array(6); + t._$RT(o), i._$RT(n); + var s = new Float32Array(6); + (s[0] = o[0] + (n[0] - o[0]) * e), + (s[1] = o[1] + (n[1] - o[1]) * e), + (s[2] = o[2] + (n[2] - o[2]) * e), + (s[3] = o[3] + (n[3] - o[3]) * e), + (s[4] = o[4] + (n[4] - o[4]) * e), + (s[5] = o[5] + (n[5] - o[5]) * e), + r._$CT(s); + }), + (F.prototype._$CT = function (t) { + var i = Math.cos(t[3]), + e = Math.sin(t[3]); + (this._$7 = t[0] * i), + (this._$f = t[0] * e), + (this._$H = t[1] * (t[2] * i - e)), + (this._$g = t[1] * (t[2] * e + i)), + (this._$k = t[4]), + (this._$w = t[5]), + this.update(); + }), + (F.prototype._$IT = function (t) { + (t[0] = this._$7), + (t[1] = this._$f), + (t[2] = this._$H), + (t[3] = this._$g), + (t[4] = this._$k), + (t[5] = this._$w); + }), + (C.prototype = new s()), + (C._$cs = "VISIBLE:"), + (C._$ar = "LAYOUT:"), + (C._$Co = 0), + (C._$D2 = []), + (C._$1T = 1), + (C.loadMotion = function (t) { + var i = new C(), + e = [0], + r = t.length; + i._$yT = 0; + for (var o = 0; o < r; ++o) { + var n = 255 & t[o]; + if ("\n" != n && "\r" != n) + if ("#" != n) + if ("$" != n) { + if ( + ("a" <= n && n <= "z") || + ("A" <= n && n <= "Z") || + "_" == n + ) { + for ( + var s = o, _ = -1; + o < r && "\r" != (n = 255 & t[o]) && "\n" != n; + ++o + ) + if ("=" == n) { + _ = o; + break; + } + if (_ >= 0) { + var a = new B(); + O.startsWith(t, s, C._$cs) + ? ((a._$RP = B._$hs), + (a._$4P = new String(t, s, _ - s))) + : O.startsWith(t, s, C._$ar) + ? ((a._$4P = new String(t, s + 7, _ - s - 7)), + O.startsWith(t, s + 7, "ANCHOR_X") + ? (a._$RP = B._$xs) + : O.startsWith(t, s + 7, "ANCHOR_Y") + ? (a._$RP = B._$us) + : O.startsWith(t, s + 7, "SCALE_X") + ? (a._$RP = B._$qs) + : O.startsWith(t, s + 7, "SCALE_Y") + ? (a._$RP = B._$Ys) + : O.startsWith(t, s + 7, "X") + ? (a._$RP = B._$ws) + : O.startsWith(t, s + 7, "Y") && + (a._$RP = B._$Ns)) + : ((a._$RP = B._$Fr), + (a._$4P = new String(t, s, _ - s))), + i.motions.push(a); + var h = 0; + for ( + C._$D2.clear(), o = _ + 1; + o < r && "\r" != (n = 255 & t[o]) && "\n" != n; + ++o + ) + if ("," != n && " " != n && "\t" != n) { + var l = O._$LS(t, r, o, e); + if (e[0] > 0) { + C._$D2.push(l), h++; + var $ = e[0]; + if ($ < o) { + console.log( + "_$n0 _$hi . @Live2DMotion loadMotion()\n" + ); + break; + } + o = $; + } + } + (a._$I0 = C._$D2._$BL()), h > i._$yT && (i._$yT = h); + } + } + } else { + for ( + var s = o, _ = -1; + o < r && "\r" != (n = 255 & t[o]) && "\n" != n; + ++o + ) + if ("=" == n) { + _ = o; + break; + } + var u = !1; + if (_ >= 0) + for ( + _ == s + 4 && + "f" == t[s + 1] && + "p" == t[s + 2] && + "s" == t[s + 3] && + (u = !0), + o = _ + 1; + o < r && "\r" != (n = 255 & t[o]) && "\n" != n; + ++o + ) + if ("," != n && " " != n && "\t" != n) { + var l = O._$LS(t, r, o, e); + e[0] > 0 && u && 5 < l && l < 121 && (i._$D0 = l), + (o = e[0]); + } + for (; o < r && "\n" != t[o] && "\r" != t[o]; ++o); + } + else for (; o < r && "\n" != t[o] && "\r" != t[o]; ++o); + } + return (i._$AS = ((1e3 * i._$yT) / i._$D0) | 0), i; + }), + (C.prototype.getDurationMSec = function () { + return this._$AS; + }), + (C.prototype.dump = function () { + for (var t = 0; t < this.motions.length; t++) { + var i = this.motions[t]; + console.log("_$wL[%s] [%d]. ", i._$4P, i._$I0.length); + for (var e = 0; e < i._$I0.length && e < 10; e++) + console.log("%5.2f ,", i._$I0[e]); + console.log("\n"); + } + }), + (C.prototype.updateParamExe = function (t, i, e, r) { + for ( + var o = i - r._$z2, + n = (o * this._$D0) / 1e3, + s = 0 | n, + _ = n - s, + a = 0; + a < this.motions.length; + a++ + ) { + var h = this.motions[a], + l = h._$I0.length, + $ = h._$4P; + if (h._$RP == B._$hs) { + var u = h._$I0[s >= l ? l - 1 : s]; + t.setParamFloat($, u); + } else if (B._$ws <= h._$RP && h._$RP <= B._$Ys); + else { + var p = t.getParamFloat($), + f = h._$I0[s >= l ? l - 1 : s], + c = h._$I0[s + 1 >= l ? l - 1 : s + 1], + d = f + (c - f) * _, + g = p + (d - p) * e; + t.setParamFloat($, g); + } + } + s >= this._$yT && + (this._$E + ? ((r._$z2 = i), this.loopFadeIn && (r._$bs = i)) + : (r._$9L = !0)); + }), + (C.prototype._$r0 = function () { + return this._$E; + }), + (C.prototype._$aL = function (t) { + this._$E = t; + }), + (C.prototype.isLoopFadeIn = function () { + return this.loopFadeIn; + }), + (C.prototype.setLoopFadeIn = function (t) { + this.loopFadeIn = t; + }), + (N.prototype.clear = function () { + this.size = 0; + }), + (N.prototype.add = function (t) { + if (this._$P.length <= this.size) { + var i = new Float32Array(2 * this.size); + w._$jT(this._$P, 0, i, 0, this.size), (this._$P = i); + } + this._$P[this.size++] = t; + }), + (N.prototype._$BL = function () { + var t = new Float32Array(this.size); + return w._$jT(this._$P, 0, t, 0, this.size), t; + }), + (B._$Fr = 0), + (B._$hs = 1), + (B._$ws = 100), + (B._$Ns = 101), + (B._$xs = 102), + (B._$us = 103), + (B._$qs = 104), + (B._$Ys = 105), + (U._$Ms = 1), + (U._$Qs = 2), + (U._$i2 = 0), + (U._$No = 2), + (U._$do = U._$Ms), + (U._$Ls = !0), + (U._$1r = 5), + (U._$Qb = 65), + (U._$J = 1e-4), + (U._$FT = 0.001), + (U._$Ss = 3), + (G._$o7 = 6), + (G._$S7 = 7), + (G._$s7 = 8), + (G._$77 = 9), + (G.LIVE2D_FORMAT_VERSION_V2_10_SDK2 = 10), + (G.LIVE2D_FORMAT_VERSION_V2_11_SDK2_1 = 11), + (G._$T7 = G.LIVE2D_FORMAT_VERSION_V2_11_SDK2_1), + (G._$Is = -2004318072), + (G._$h0 = 0), + (G._$4L = 23), + (G._$7P = 33), + (G._$uT = function (t) { + console.log("_$bo :: _$6 _$mo _$E0 : %d\n", t); + }), + (G._$9o = function (t) { + if (t < 40) return G._$uT(t), null; + if (t < 50) return G._$uT(t), null; + if (t < 60) return G._$uT(t), null; + if (t < 100) + switch (t) { + case 65: + return new Z(); + case 66: + return new D(); + case 67: + return new x(); + case 68: + return new z(); + case 69: + return new P(); + case 70: + return new $t(); + default: + return G._$uT(t), null; + } + else if (t < 150) + switch (t) { + case 131: + return new st(); + case 133: + return new tt(); + case 136: + return new p(); + case 137: + return new ot(); + case 142: + return new j(); + } + return G._$uT(t), null; + }), + (Y._$HP = 0), + (Y._$_0 = !0); + (Y._$V2 = -1), + (Y._$W0 = -1), + (Y._$jr = !1), + (Y._$ZS = !0), + (Y._$tr = -1e6), + (Y._$lr = 1e6), + (Y._$is = 32), + (Y._$e = !1), + (Y.prototype.getDrawDataIndex = function (t) { + for (var i = this._$aS.length - 1; i >= 0; --i) + if (null != this._$aS[i] && this._$aS[i].getDrawDataID() == t) + return i; + return -1; + }), + (Y.prototype.getDrawData = function (t) { + if (t instanceof b) { + if (null == this._$Bo) { + this._$Bo = new Object(); + for (var i = this._$aS.length, e = 0; e < i; e++) { + var r = this._$aS[e], + o = r.getDrawDataID(); + null != o && (this._$Bo[o] = r); + } + } + return this._$Bo[id]; + } + return t < this._$aS.length ? this._$aS[t] : null; + }), + (Y.prototype.release = function () { + this._$3S.clear(), + this._$aS.clear(), + this._$F2.clear(), + null != this._$Bo && this._$Bo.clear(), + this._$db.clear(), + this._$8b.clear(), + this._$Hr.clear(); + }), + (Y.prototype.init = function () { + this._$co++, this._$F2.length > 0 && this.release(); + for ( + var t = this._$Ri.getModelImpl(), + i = t._$Xr(), + r = i.length, + o = new Array(), + n = new Array(), + s = 0; + s < r; + ++s + ) { + var _ = i[s]; + this._$F2.push(_), this._$Hr.push(_.init(this)); + for (var a = _.getBaseData(), h = a.length, l = 0; l < h; ++l) + o.push(a[l]); + for (var l = 0; l < h; ++l) { + var $ = a[l].init(this); + $._$l2(s), n.push($); + } + for (var u = _.getDrawData(), p = u.length, l = 0; l < p; ++l) { + var f = u[l], + c = f.init(this); + (c._$IP = s), this._$aS.push(f), this._$8b.push(c); + } + } + for (var d = o.length, g = yt._$2o(); ; ) { + for (var y = !1, s = 0; s < d; ++s) { + var m = o[s]; + if (null != m) { + var T = m.getTargetBaseDataID(); + (null == T || T == g || this.getBaseDataIndex(T) >= 0) && + (this._$3S.push(m), + this._$db.push(n[s]), + (o[s] = null), + (y = !0)); + } + } + if (!y) break; + } + var P = t._$E2(); + if (null != P) { + var S = P._$1s(); + if (null != S) + for (var v = S.length, s = 0; s < v; ++s) { + var L = S[s]; + null != L && + this._$02( + L.getParamID(), + L.getDefaultValue(), + L.getMinValue(), + L.getMaxValue() + ); + } + } + (this.clipManager = new e(this.dp_webgl)), + this.clipManager.init(this, this._$aS, this._$8b), + (this._$QT = !0); + }), + (Y.prototype.update = function () { + Y._$e && _.start("_$zL"); + for (var t = this._$_2.length, i = 0; i < t; i++) + this._$_2[i] != this._$vr[i] && + ((this._$Js[i] = Y._$ZS), (this._$vr[i] = this._$_2[i])); + var e = this._$3S.length, + r = this._$aS.length, + o = W._$or(), + n = W._$Pr(), + s = n - o + 1; + (null == this._$Ws || this._$Ws.length < s) && + ((this._$Ws = new Int16Array(s)), + (this._$Vs = new Int16Array(s))); + for (var i = 0; i < s; i++) + (this._$Ws[i] = Y._$V2), (this._$Vs[i] = Y._$V2); + (null == this._$Er || this._$Er.length < r) && + (this._$Er = new Int16Array(r)); + for (var i = 0; i < r; i++) this._$Er[i] = Y._$W0; + Y._$e && _.dump("_$zL"), Y._$e && _.start("_$UL"); + for (var a = null, h = 0; h < e; ++h) { + var l = this._$3S[h], + $ = this._$db[h]; + try { + l._$Nr(this, $), l._$2b(this, $); + } catch (t) { + null == a && (a = t); + } + } + null != a && Y._$_0 && _._$Rb(a), + Y._$e && _.dump("_$UL"), + Y._$e && _.start("_$DL"); + for (var u = null, p = 0; p < r; ++p) { + var f = this._$aS[p], + c = this._$8b[p]; + try { + if ((f._$Nr(this, c), c._$u2())) continue; + f._$2b(this, c); + var d, + g = Math.floor(f._$zS(this, c) - o); + try { + d = this._$Vs[g]; + } catch (t) { + console.log( + "_$li :: %s / %s \t\t\t\t@@_$fS\n", + t.toString(), + f.getDrawDataID().toString() + ), + (g = Math.floor(f._$zS(this, c) - o)); + continue; + } + d == Y._$V2 ? (this._$Ws[g] = p) : (this._$Er[d] = p), + (this._$Vs[g] = p); + } catch (t) { + null == u && ((u = t), at._$sT(at._$H7)); + } + } + null != u && Y._$_0 && _._$Rb(u), + Y._$e && _.dump("_$DL"), + Y._$e && _.start("_$eL"); + for (var i = this._$Js.length - 1; i >= 0; i--) + this._$Js[i] = Y._$jr; + return (this._$QT = !1), Y._$e && _.dump("_$eL"), !1; + }), + (Y.prototype.preDraw = function (t) { + null != this.clipManager && + (t._$ZT(), this.clipManager.setupClip(this, t)); + }), + (Y.prototype.draw = function (t) { + if (null == this._$Ws) + return void _._$li("call _$Ri.update() before _$Ri.draw() "); + var i = this._$Ws.length; + t._$ZT(); + for (var e = 0; e < i; ++e) { + var r = this._$Ws[e]; + if (r != Y._$V2) + for (;;) { + var o = this._$aS[r], + n = this._$8b[r]; + if (n._$yo()) { + var s = n._$IP, + a = this._$Hr[s]; + (n._$VS = a.getPartsOpacity()), o.draw(t, this, n); + } + var h = this._$Er[r]; + if (h <= r || h == Y._$W0) break; + r = h; + } + } + }), + (Y.prototype.getParamIndex = function (t) { + for (var i = this._$pb.length - 1; i >= 0; --i) + if (this._$pb[i] == t) return i; + return this._$02(t, 0, Y._$tr, Y._$lr); + }), + (Y.prototype._$BS = function (t) { + return this.getBaseDataIndex(t); + }), + (Y.prototype.getBaseDataIndex = function (t) { + for (var i = this._$3S.length - 1; i >= 0; --i) + if (null != this._$3S[i] && this._$3S[i].getBaseDataID() == t) + return i; + return -1; + }), + (Y.prototype._$UT = function (t, i) { + var e = new Float32Array(i); + return w._$jT(t, 0, e, 0, t.length), e; + }), + (Y.prototype._$02 = function (t, i, e, r) { + if (this._$qo >= this._$pb.length) { + var o = this._$pb.length, + n = new Array(2 * o); + w._$jT(this._$pb, 0, n, 0, o), + (this._$pb = n), + (this._$_2 = this._$UT(this._$_2, 2 * o)), + (this._$vr = this._$UT(this._$vr, 2 * o)), + (this._$Rr = this._$UT(this._$Rr, 2 * o)), + (this._$Or = this._$UT(this._$Or, 2 * o)); + var s = new Array(); + w._$jT(this._$Js, 0, s, 0, o), (this._$Js = s); + } + return ( + (this._$pb[this._$qo] = t), + (this._$_2[this._$qo] = i), + (this._$vr[this._$qo] = i), + (this._$Rr[this._$qo] = e), + (this._$Or[this._$qo] = r), + (this._$Js[this._$qo] = Y._$ZS), + this._$qo++ + ); + }), + (Y.prototype._$Zo = function (t, i) { + this._$3S[t] = i; + }), + (Y.prototype.setParamFloat = function (t, i) { + i < this._$Rr[t] && (i = this._$Rr[t]), + i > this._$Or[t] && (i = this._$Or[t]), + (this._$_2[t] = i); + }), + (Y.prototype.loadParam = function () { + var t = this._$_2.length; + t > this._$fs.length && (t = this._$fs.length), + w._$jT(this._$fs, 0, this._$_2, 0, t); + }), + (Y.prototype.saveParam = function () { + var t = this._$_2.length; + t > this._$fs.length && (this._$fs = new Float32Array(t)), + w._$jT(this._$_2, 0, this._$fs, 0, t); + }), + (Y.prototype._$v2 = function () { + return this._$co; + }), + (Y.prototype._$WS = function () { + return this._$QT; + }), + (Y.prototype._$Xb = function (t) { + return this._$Js[t] == Y._$ZS; + }), + (Y.prototype._$vs = function () { + return this._$Es; + }), + (Y.prototype._$Tr = function () { + return this._$ZP; + }), + (Y.prototype.getBaseData = function (t) { + return this._$3S[t]; + }), + (Y.prototype.getParamFloat = function (t) { + return this._$_2[t]; + }), + (Y.prototype.getParamMax = function (t) { + return this._$Or[t]; + }), + (Y.prototype.getParamMin = function (t) { + return this._$Rr[t]; + }), + (Y.prototype.setPartsOpacity = function (t, i) { + this._$Hr[t].setPartsOpacity(i); + }), + (Y.prototype.getPartsOpacity = function (t) { + return this._$Hr[t].getPartsOpacity(); + }), + (Y.prototype.getPartsDataIndex = function (t) { + for (var i = this._$F2.length - 1; i >= 0; --i) + if (null != this._$F2[i] && this._$F2[i]._$p2() == t) return i; + return -1; + }), + (Y.prototype._$q2 = function (t) { + return this._$db[t]; + }), + (Y.prototype._$C2 = function (t) { + return this._$8b[t]; + }), + (Y.prototype._$Bb = function (t) { + return this._$Hr[t]; + }), + (Y.prototype._$5s = function (t, i) { + for (var e = this._$Ws.length, r = t, o = 0; o < e; ++o) { + var n = this._$Ws[o]; + if (n != Y._$V2) + for (;;) { + var s = this._$8b[n]; + s._$yo() && (s._$GT()._$B2(this, s, r), (r += i)); + var _ = this._$Er[n]; + if (_ <= n || _ == Y._$W0) break; + n = _; + } + } + }), + (Y.prototype.setDrawParam = function (t) { + this.dp_webgl = t; + }), + (Y.prototype.getDrawParam = function () { + return this.dp_webgl; + }), + (k._$0T = function (t) { + return k._$0T(new _$5(t)); + }), + (k._$0T = function (t) { + if (!t.exists()) throw new _$ls(t._$3b()); + for ( + var i, + e = t.length(), + r = new Int8Array(e), + o = new _$Xs(new _$kb(t), 8192), + n = 0; + (i = o.read(r, n, e - n)) > 0; + + ) + n += i; + return r; + }), + (k._$C = function (t) { + var i = null, + e = null; + try { + (i = t instanceof Array ? t : new _$Xs(t, 8192)), + (e = new _$js()); + for (var r, o = new Int8Array(1e3); (r = i.read(o)) > 0; ) + e.write(o, 0, r); + return e._$TS(); + } finally { + null != t && t.close(), null != e && (e.flush(), e.close()); + } + }), + (V.prototype._$T2 = function () { + return w.getUserTimeMSec() + Math._$10() * (2 * this._$Br - 1); + }), + (V.prototype._$uo = function (t) { + this._$Br = t; + }), + (V.prototype._$QS = function (t, i, e) { + (this._$Dr = t), (this._$Cb = i), (this._$mr = e); + }), + (V.prototype._$7T = function (t) { + var i, + e = w.getUserTimeMSec(), + r = 0; + switch (this._$_L) { + case STATE_CLOSING: + (r = (e - this._$bb) / this._$Dr), + r >= 1 && + ((r = 1), (this._$_L = wt.STATE_CLOSED), (this._$bb = e)), + (i = 1 - r); + break; + case STATE_CLOSED: + (r = (e - this._$bb) / this._$Cb), + r >= 1 && ((this._$_L = wt.STATE_OPENING), (this._$bb = e)), + (i = 0); + break; + case STATE_OPENING: + (r = (e - this._$bb) / this._$mr), + r >= 1 && + ((r = 1), + (this._$_L = wt.STATE_INTERVAL), + (this._$12 = this._$T2())), + (i = r); + break; + case STATE_INTERVAL: + this._$12 < e && + ((this._$_L = wt.STATE_CLOSING), (this._$bb = e)), + (i = 1); + break; + case STATE_FIRST: + default: + (this._$_L = wt.STATE_INTERVAL), + (this._$12 = this._$T2()), + (i = 1); + } + this._$jo || (i = -i), + t.setParamFloat(this._$iL, i), + t.setParamFloat(this._$0L, i); + }); + var wt = function () {}; + (wt.STATE_FIRST = "STATE_FIRST"), + (wt.STATE_INTERVAL = "STATE_INTERVAL"), + (wt.STATE_CLOSING = "STATE_CLOSING"), + (wt.STATE_CLOSED = "STATE_CLOSED"), + (wt.STATE_OPENING = "STATE_OPENING"), + (X.prototype = new E()), + (X._$As = 32), + (X._$Gr = !1), + (X._$NT = null), + (X._$vS = null), + (X._$no = null), + (X._$9r = function (t) { + return new Float32Array(t); + }), + (X._$vb = function (t) { + return new Int16Array(t); + }), + (X._$cr = function (t, i) { + return ( + null == t || t._$yL() < i.length + ? ((t = X._$9r(2 * i.length)), t.put(i), t._$oT(0)) + : (t.clear(), t.put(i), t._$oT(0)), + t + ); + }), + (X._$mb = function (t, i) { + return ( + null == t || t._$yL() < i.length + ? ((t = X._$vb(2 * i.length)), t.put(i), t._$oT(0)) + : (t.clear(), t.put(i), t._$oT(0)), + t + ); + }), + (X._$Hs = function () { + return X._$Gr; + }), + (X._$as = function (t) { + X._$Gr = t; + }), + (X.prototype.setGL = function (t) { + this.gl = t; + }), + (X.prototype.setTransform = function (t) { + this.transform = t; + }), + (X.prototype._$ZT = function () {}), + (X.prototype._$Uo = function (t, i, e, r, o, n, s, _) { + if (!(n < 0.01)) { + var a = this._$U2[t], + h = n > 0.9 ? at.EXPAND_W : 0; + this.gl.drawElements(a, e, r, o, n, h, this.transform, _); + } + }), + (X.prototype._$Rs = function () { + throw new Error("_$Rs"); + }), + (X.prototype._$Ds = function (t) { + throw new Error("_$Ds"); + }), + (X.prototype._$K2 = function () { + for (var t = 0; t < this._$sb.length; t++) { + 0 != this._$sb[t] && + (this.gl._$Sr(1, this._$sb, t), (this._$sb[t] = 0)); + } + }), + (X.prototype.setTexture = function (t, i) { + this._$sb.length < t + 1 && this._$nS(t), (this._$sb[t] = i); + }), + (X.prototype.setTexture = function (t, i) { + this._$sb.length < t + 1 && this._$nS(t), (this._$U2[t] = i); + }), + (X.prototype._$nS = function (t) { + var i = Math.max(2 * this._$sb.length, t + 1 + 10), + e = new Int32Array(i); + w._$jT(this._$sb, 0, e, 0, this._$sb.length), (this._$sb = e); + var r = new Array(); + w._$jT(this._$U2, 0, r, 0, this._$U2.length), (this._$U2 = r); + }), + (z.prototype = new I()), + (z._$Xo = new Float32Array(2)), + (z._$io = new Float32Array(2)), + (z._$0o = new Float32Array(2)), + (z._$Lo = new Float32Array(2)), + (z._$To = new Float32Array(2)), + (z._$Po = new Float32Array(2)), + (z._$gT = new Array()), + (z.prototype._$zP = function () { + (this._$GS = new D()), this._$GS._$zP(), (this._$Y0 = new Array()); + }), + (z.prototype.getType = function () { + return I._$c2; + }), + (z.prototype._$F0 = function (t) { + I.prototype._$F0.call(this, t), + (this._$GS = t._$nP()), + (this._$Y0 = t._$nP()), + I.prototype.readV2_opacity.call(this, t); + }), + (z.prototype.init = function (t) { + var i = new H(this); + return (i._$Yr = new P()), this._$32() && (i._$Wr = new P()), i; + }), + (z.prototype._$Nr = function (t, i) { + this != i._$GT() && console.log("### assert!! ### "); + var e = i; + if (this._$GS._$Ur(t)) { + var r = z._$gT; + r[0] = !1; + var o = this._$GS._$Q2(t, r); + i._$Ib(r[0]), this.interpolateOpacity(t, this._$GS, i, r); + var n = t._$vs(), + s = t._$Tr(); + if ((this._$GS._$zr(n, s, o), o <= 0)) { + var _ = this._$Y0[n[0]]; + e._$Yr.init(_); + } else if (1 == o) { + var _ = this._$Y0[n[0]], + a = this._$Y0[n[1]], + h = s[0]; + (e._$Yr._$fL = _._$fL + (a._$fL - _._$fL) * h), + (e._$Yr._$gL = _._$gL + (a._$gL - _._$gL) * h), + (e._$Yr._$B0 = _._$B0 + (a._$B0 - _._$B0) * h), + (e._$Yr._$z0 = _._$z0 + (a._$z0 - _._$z0) * h), + (e._$Yr._$qT = _._$qT + (a._$qT - _._$qT) * h); + } else if (2 == o) { + var _ = this._$Y0[n[0]], + a = this._$Y0[n[1]], + l = this._$Y0[n[2]], + $ = this._$Y0[n[3]], + h = s[0], + u = s[1], + p = _._$fL + (a._$fL - _._$fL) * h, + f = l._$fL + ($._$fL - l._$fL) * h; + (e._$Yr._$fL = p + (f - p) * u), + (p = _._$gL + (a._$gL - _._$gL) * h), + (f = l._$gL + ($._$gL - l._$gL) * h), + (e._$Yr._$gL = p + (f - p) * u), + (p = _._$B0 + (a._$B0 - _._$B0) * h), + (f = l._$B0 + ($._$B0 - l._$B0) * h), + (e._$Yr._$B0 = p + (f - p) * u), + (p = _._$z0 + (a._$z0 - _._$z0) * h), + (f = l._$z0 + ($._$z0 - l._$z0) * h), + (e._$Yr._$z0 = p + (f - p) * u), + (p = _._$qT + (a._$qT - _._$qT) * h), + (f = l._$qT + ($._$qT - l._$qT) * h), + (e._$Yr._$qT = p + (f - p) * u); + } else if (3 == o) { + var c = this._$Y0[n[0]], + d = this._$Y0[n[1]], + g = this._$Y0[n[2]], + y = this._$Y0[n[3]], + m = this._$Y0[n[4]], + T = this._$Y0[n[5]], + P = this._$Y0[n[6]], + S = this._$Y0[n[7]], + h = s[0], + u = s[1], + v = s[2], + p = c._$fL + (d._$fL - c._$fL) * h, + f = g._$fL + (y._$fL - g._$fL) * h, + L = m._$fL + (T._$fL - m._$fL) * h, + M = P._$fL + (S._$fL - P._$fL) * h; + (e._$Yr._$fL = + (1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)), + (p = c._$gL + (d._$gL - c._$gL) * h), + (f = g._$gL + (y._$gL - g._$gL) * h), + (L = m._$gL + (T._$gL - m._$gL) * h), + (M = P._$gL + (S._$gL - P._$gL) * h), + (e._$Yr._$gL = + (1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)), + (p = c._$B0 + (d._$B0 - c._$B0) * h), + (f = g._$B0 + (y._$B0 - g._$B0) * h), + (L = m._$B0 + (T._$B0 - m._$B0) * h), + (M = P._$B0 + (S._$B0 - P._$B0) * h), + (e._$Yr._$B0 = + (1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)), + (p = c._$z0 + (d._$z0 - c._$z0) * h), + (f = g._$z0 + (y._$z0 - g._$z0) * h), + (L = m._$z0 + (T._$z0 - m._$z0) * h), + (M = P._$z0 + (S._$z0 - P._$z0) * h), + (e._$Yr._$z0 = + (1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)), + (p = c._$qT + (d._$qT - c._$qT) * h), + (f = g._$qT + (y._$qT - g._$qT) * h), + (L = m._$qT + (T._$qT - m._$qT) * h), + (M = P._$qT + (S._$qT - P._$qT) * h), + (e._$Yr._$qT = + (1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)); + } else if (4 == o) { + var E = this._$Y0[n[0]], + A = this._$Y0[n[1]], + I = this._$Y0[n[2]], + w = this._$Y0[n[3]], + x = this._$Y0[n[4]], + O = this._$Y0[n[5]], + D = this._$Y0[n[6]], + R = this._$Y0[n[7]], + b = this._$Y0[n[8]], + F = this._$Y0[n[9]], + C = this._$Y0[n[10]], + N = this._$Y0[n[11]], + B = this._$Y0[n[12]], + U = this._$Y0[n[13]], + G = this._$Y0[n[14]], + Y = this._$Y0[n[15]], + h = s[0], + u = s[1], + v = s[2], + k = s[3], + p = E._$fL + (A._$fL - E._$fL) * h, + f = I._$fL + (w._$fL - I._$fL) * h, + L = x._$fL + (O._$fL - x._$fL) * h, + M = D._$fL + (R._$fL - D._$fL) * h, + V = b._$fL + (F._$fL - b._$fL) * h, + X = C._$fL + (N._$fL - C._$fL) * h, + H = B._$fL + (U._$fL - B._$fL) * h, + W = G._$fL + (Y._$fL - G._$fL) * h; + (e._$Yr._$fL = + (1 - k) * + ((1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)) + + k * ((1 - v) * (V + (X - V) * u) + v * (H + (W - H) * u))), + (p = E._$gL + (A._$gL - E._$gL) * h), + (f = I._$gL + (w._$gL - I._$gL) * h), + (L = x._$gL + (O._$gL - x._$gL) * h), + (M = D._$gL + (R._$gL - D._$gL) * h), + (V = b._$gL + (F._$gL - b._$gL) * h), + (X = C._$gL + (N._$gL - C._$gL) * h), + (H = B._$gL + (U._$gL - B._$gL) * h), + (W = G._$gL + (Y._$gL - G._$gL) * h), + (e._$Yr._$gL = + (1 - k) * + ((1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)) + + k * ((1 - v) * (V + (X - V) * u) + v * (H + (W - H) * u))), + (p = E._$B0 + (A._$B0 - E._$B0) * h), + (f = I._$B0 + (w._$B0 - I._$B0) * h), + (L = x._$B0 + (O._$B0 - x._$B0) * h), + (M = D._$B0 + (R._$B0 - D._$B0) * h), + (V = b._$B0 + (F._$B0 - b._$B0) * h), + (X = C._$B0 + (N._$B0 - C._$B0) * h), + (H = B._$B0 + (U._$B0 - B._$B0) * h), + (W = G._$B0 + (Y._$B0 - G._$B0) * h), + (e._$Yr._$B0 = + (1 - k) * + ((1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)) + + k * ((1 - v) * (V + (X - V) * u) + v * (H + (W - H) * u))), + (p = E._$z0 + (A._$z0 - E._$z0) * h), + (f = I._$z0 + (w._$z0 - I._$z0) * h), + (L = x._$z0 + (O._$z0 - x._$z0) * h), + (M = D._$z0 + (R._$z0 - D._$z0) * h), + (V = b._$z0 + (F._$z0 - b._$z0) * h), + (X = C._$z0 + (N._$z0 - C._$z0) * h), + (H = B._$z0 + (U._$z0 - B._$z0) * h), + (W = G._$z0 + (Y._$z0 - G._$z0) * h), + (e._$Yr._$z0 = + (1 - k) * + ((1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)) + + k * ((1 - v) * (V + (X - V) * u) + v * (H + (W - H) * u))), + (p = E._$qT + (A._$qT - E._$qT) * h), + (f = I._$qT + (w._$qT - I._$qT) * h), + (L = x._$qT + (O._$qT - x._$qT) * h), + (M = D._$qT + (R._$qT - D._$qT) * h), + (V = b._$qT + (F._$qT - b._$qT) * h), + (X = C._$qT + (N._$qT - C._$qT) * h), + (H = B._$qT + (U._$qT - B._$qT) * h), + (W = G._$qT + (Y._$qT - G._$qT) * h), + (e._$Yr._$qT = + (1 - k) * + ((1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)) + + k * ((1 - v) * (V + (X - V) * u) + v * (H + (W - H) * u))); + } else { + for ( + var j = 0 | Math.pow(2, o), q = new Float32Array(j), J = 0; + J < j; + J++ + ) { + for (var Q = J, Z = 1, K = 0; K < o; K++) + (Z *= Q % 2 == 0 ? 1 - s[K] : s[K]), (Q /= 2); + q[J] = Z; + } + for (var tt = new Array(), it = 0; it < j; it++) + tt[it] = this._$Y0[n[it]]; + for ( + var et = 0, rt = 0, ot = 0, nt = 0, st = 0, it = 0; + it < j; + it++ + ) + (et += q[it] * tt[it]._$fL), + (rt += q[it] * tt[it]._$gL), + (ot += q[it] * tt[it]._$B0), + (nt += q[it] * tt[it]._$z0), + (st += q[it] * tt[it]._$qT); + (e._$Yr._$fL = et), + (e._$Yr._$gL = rt), + (e._$Yr._$B0 = ot), + (e._$Yr._$z0 = nt), + (e._$Yr._$qT = st); + } + var _ = this._$Y0[n[0]]; + (e._$Yr.reflectX = _.reflectX), (e._$Yr.reflectY = _.reflectY); + } + }), + (z.prototype._$2b = function (t, i) { + this != i._$GT() && console.log("### assert!! ### "); + var e = i; + if ((e._$hS(!0), this._$32())) { + var r = this.getTargetBaseDataID(); + if ( + (e._$8r == I._$ur && (e._$8r = t.getBaseDataIndex(r)), + e._$8r < 0) + ) + at._$so && _._$li("_$L _$0P _$G :: %s", r), e._$hS(!1); + else { + var o = t.getBaseData(e._$8r); + if (null != o) { + var n = t._$q2(e._$8r), + s = z._$Xo; + (s[0] = e._$Yr._$fL), (s[1] = e._$Yr._$gL); + var a = z._$io; + (a[0] = 0), (a[1] = -0.1); + n._$GT().getType() == I._$c2 ? (a[1] = -10) : (a[1] = -0.1); + var h = z._$0o; + this._$Jr(t, o, n, s, a, h); + var l = Lt._$92(a, h); + o._$nb(t, n, s, s, 1, 0, 2), + (e._$Wr._$fL = s[0]), + (e._$Wr._$gL = s[1]), + (e._$Wr._$B0 = e._$Yr._$B0), + (e._$Wr._$z0 = e._$Yr._$z0), + (e._$Wr._$qT = e._$Yr._$qT - l * Lt._$NS); + var $ = n.getTotalScale(); + e.setTotalScale_notForClient($ * e._$Wr._$B0); + var u = n.getTotalOpacity(); + e.setTotalOpacity(u * e.getInterpolatedOpacity()), + (e._$Wr.reflectX = e._$Yr.reflectX), + (e._$Wr.reflectY = e._$Yr.reflectY), + e._$hS(n._$yo()); + } else e._$hS(!1); + } + } else + e.setTotalScale_notForClient(e._$Yr._$B0), + e.setTotalOpacity(e.getInterpolatedOpacity()); + }), + (z.prototype._$nb = function (t, i, e, r, o, n, s) { + this != i._$GT() && console.log("### assert!! ### "); + for ( + var _, + a, + h = i, + l = null != h._$Wr ? h._$Wr : h._$Yr, + $ = Math.sin(Lt._$bS * l._$qT), + u = Math.cos(Lt._$bS * l._$qT), + p = h.getTotalScale(), + f = l.reflectX ? -1 : 1, + c = l.reflectY ? -1 : 1, + d = u * p * f, + g = -$ * p * c, + y = $ * p * f, + m = u * p * c, + T = l._$fL, + P = l._$gL, + S = o * s, + v = n; + v < S; + v += s + ) + (_ = e[v]), + (a = e[v + 1]), + (r[v] = d * _ + g * a + T), + (r[v + 1] = y * _ + m * a + P); + }), + (z.prototype._$Jr = function (t, i, e, r, o, n) { + i != e._$GT() && console.log("### assert!! ### "); + var s = z._$Lo; + (z._$Lo[0] = r[0]), (z._$Lo[1] = r[1]), i._$nb(t, e, s, s, 1, 0, 2); + for (var _ = z._$To, a = z._$Po, h = 1, l = 0; l < 10; l++) { + if ( + ((a[0] = r[0] + h * o[0]), + (a[1] = r[1] + h * o[1]), + i._$nb(t, e, a, _, 1, 0, 2), + (_[0] -= s[0]), + (_[1] -= s[1]), + 0 != _[0] || 0 != _[1]) + ) + return (n[0] = _[0]), void (n[1] = _[1]); + if ( + ((a[0] = r[0] - h * o[0]), + (a[1] = r[1] - h * o[1]), + i._$nb(t, e, a, _, 1, 0, 2), + (_[0] -= s[0]), + (_[1] -= s[1]), + 0 != _[0] || 0 != _[1]) + ) + return ( + (_[0] = -_[0]), + (_[0] = -_[0]), + (n[0] = _[0]), + void (n[1] = _[1]) + ); + h *= 0.1; + } + at._$so && console.log("_$L0 to transform _$SP\n"); + }), + (H.prototype = new _t()), + (W.prototype = new M()), + (W._$ur = -2), + (W._$ES = 500), + (W._$wb = 2), + (W._$8S = 3), + (W._$os = 4), + (W._$52 = W._$ES), + (W._$R2 = W._$ES), + (W._$Sb = function (t) { + for (var i = t.length - 1; i >= 0; --i) { + var e = t[i]; + e < W._$52 ? (W._$52 = e) : e > W._$R2 && (W._$R2 = e); + } + }), + (W._$or = function () { + return W._$52; + }), + (W._$Pr = function () { + return W._$R2; + }), + (W.prototype._$F0 = function (t) { + (this._$gP = t._$nP()), + (this._$dr = t._$nP()), + (this._$GS = t._$nP()), + (this._$qb = t._$6L()), + (this._$Lb = t._$cS()), + (this._$mS = t._$Tb()), + t.getFormatVersion() >= G._$T7 + ? ((this.clipID = t._$nP()), + (this.clipIDList = this.convertClipIDForV2_11(this.clipID))) + : (this.clipIDList = null), + W._$Sb(this._$Lb); + }), + (W.prototype.getClipIDList = function () { + return this.clipIDList; + }), + (W.prototype._$Nr = function (t, i) { + if ( + ((i._$IS[0] = !1), + (i._$Us = v._$Z2(t, this._$GS, i._$IS, this._$Lb)), + at._$Zs) + ); + else if (i._$IS[0]) return; + i._$7s = v._$br(t, this._$GS, i._$IS, this._$mS); + }), + (W.prototype._$2b = function (t) {}), + (W.prototype.getDrawDataID = function () { + return this._$gP; + }), + (W.prototype._$j2 = function (t) { + this._$gP = t; + }), + (W.prototype.getOpacity = function (t, i) { + return i._$7s; + }), + (W.prototype._$zS = function (t, i) { + return i._$Us; + }), + (W.prototype.getTargetBaseDataID = function () { + return this._$dr; + }), + (W.prototype._$gs = function (t) { + this._$dr = t; + }), + (W.prototype._$32 = function () { + return null != this._$dr && this._$dr != yt._$2o(); + }), + (W.prototype.getType = function () {}), + (j._$42 = 0), + (j.prototype._$1b = function () { + return this._$3S; + }), + (j.prototype.getDrawDataList = function () { + return this._$aS; + }), + (j.prototype._$F0 = function (t) { + (this._$NL = t._$nP()), + (this._$aS = t._$nP()), + (this._$3S = t._$nP()); + }), + (j.prototype._$kr = function (t) { + t._$Zo(this._$3S), + t._$xo(this._$aS), + (this._$3S = null), + (this._$aS = null); + }), + (q.prototype = new i()), + (q.loadModel = function (t) { + var e = new q(); + return i._$62(e, t), e; + }), + (q.loadModel = function (t) { + var e = new q(); + return i._$62(e, t), e; + }), + (q._$to = function () { + return new q(); + }), + (q._$er = function (t) { + var i = new _$5("../_$_r/_$t0/_$Ri/_$_P._$d"); + if (0 == i.exists()) + throw new _$ls("_$t0 _$_ _$6 _$Ui :: " + i._$PL()); + for ( + var e = [ + "../_$_r/_$t0/_$Ri/_$_P.512/_$CP._$1", + "../_$_r/_$t0/_$Ri/_$_P.512/_$vP._$1", + "../_$_r/_$t0/_$Ri/_$_P.512/_$EP._$1", + "../_$_r/_$t0/_$Ri/_$_P.512/_$pP._$1", + ], + r = q.loadModel(i._$3b()), + o = 0; + o < e.length; + o++ + ) { + var n = new _$5(e[o]); + if (0 == n.exists()) + throw new _$ls("_$t0 _$_ _$6 _$Ui :: " + n._$PL()); + r.setTexture(o, _$nL._$_o(t, n._$3b())); + } + return r; + }), + (q.prototype.setGL = function (t) { + this._$zo.setGL(t); + }), + (q.prototype.setTransform = function (t) { + this._$zo.setTransform(t); + }), + (q.prototype.draw = function () { + this._$5S.draw(this._$zo); + }), + (q.prototype._$K2 = function () { + this._$zo._$K2(); + }), + (q.prototype.setTexture = function (t, i) { + null == this._$zo && + _._$li("_$Yi for QT _$ki / _$XS() is _$6 _$ui!!"), + this._$zo.setTexture(t, i); + }), + (q.prototype.setTexture = function (t, i) { + null == this._$zo && + _._$li("_$Yi for QT _$ki / _$XS() is _$6 _$ui!!"), + this._$zo.setTexture(t, i); + }), + (q.prototype._$Rs = function () { + return this._$zo._$Rs(); + }), + (q.prototype._$Ds = function (t) { + this._$zo._$Ds(t); + }), + (q.prototype.getDrawParam = function () { + return this._$zo; + }), + (J.prototype = new s()), + (J._$cs = "VISIBLE:"), + (J._$ar = "LAYOUT:"), + (J.MTN_PREFIX_FADEIN = "FADEIN:"), + (J.MTN_PREFIX_FADEOUT = "FADEOUT:"), + (J._$Co = 0), + (J._$1T = 1), + (J.loadMotion = function (t) { + var i = k._$C(t); + return J.loadMotion(i); + }), + (J.loadMotion = function (t) { + t instanceof ArrayBuffer && (t = new DataView(t)); + var i = new J(), + e = [0], + r = t.byteLength; + i._$yT = 0; + for (var o = 0; o < r; ++o) { + var n = Q(t, o), + s = n.charCodeAt(0); + if ("\n" != n && "\r" != n) + if ("#" != n) + if ("$" != n) { + if ( + (97 <= s && s <= 122) || + (65 <= s && s <= 90) || + "_" == n + ) { + for ( + var _ = o, a = -1; + o < r && "\r" != (n = Q(t, o)) && "\n" != n; + ++o + ) + if ("=" == n) { + a = o; + break; + } + if (a >= 0) { + var h = new B(); + O.startsWith(t, _, J._$cs) + ? ((h._$RP = B._$hs), + (h._$4P = O.createString(t, _, a - _))) + : O.startsWith(t, _, J._$ar) + ? ((h._$4P = O.createString(t, _ + 7, a - _ - 7)), + O.startsWith(t, _ + 7, "ANCHOR_X") + ? (h._$RP = B._$xs) + : O.startsWith(t, _ + 7, "ANCHOR_Y") + ? (h._$RP = B._$us) + : O.startsWith(t, _ + 7, "SCALE_X") + ? (h._$RP = B._$qs) + : O.startsWith(t, _ + 7, "SCALE_Y") + ? (h._$RP = B._$Ys) + : O.startsWith(t, _ + 7, "X") + ? (h._$RP = B._$ws) + : O.startsWith(t, _ + 7, "Y") && + (h._$RP = B._$Ns)) + : ((h._$RP = B._$Fr), + (h._$4P = O.createString(t, _, a - _))), + i.motions.push(h); + var l = 0, + $ = []; + for ( + o = a + 1; + o < r && "\r" != (n = Q(t, o)) && "\n" != n; + ++o + ) + if ("," != n && " " != n && "\t" != n) { + var u = O._$LS(t, r, o, e); + if (e[0] > 0) { + $.push(u), l++; + var p = e[0]; + if (p < o) { + console.log( + "_$n0 _$hi . @Live2DMotion loadMotion()\n" + ); + break; + } + o = p - 1; + } + } + (h._$I0 = new Float32Array($)), + l > i._$yT && (i._$yT = l); + } + } + } else { + for ( + var _ = o, a = -1; + o < r && "\r" != (n = Q(t, o)) && "\n" != n; + ++o + ) + if ("=" == n) { + a = o; + break; + } + var f = !1; + if (a >= 0) + for ( + a == _ + 4 && + "f" == Q(t, _ + 1) && + "p" == Q(t, _ + 2) && + "s" == Q(t, _ + 3) && + (f = !0), + o = a + 1; + o < r && "\r" != (n = Q(t, o)) && "\n" != n; + ++o + ) + if ("," != n && " " != n && "\t" != n) { + var u = O._$LS(t, r, o, e); + e[0] > 0 && f && 5 < u && u < 121 && (i._$D0 = u), + (o = e[0]); + } + for (; o < r && "\n" != Q(t, o) && "\r" != Q(t, o); ++o); + } + else for (; o < r && "\n" != Q(t, o) && "\r" != Q(t, o); ++o); + } + return (i._$rr = ((1e3 * i._$yT) / i._$D0) | 0), i; + }), + (J.prototype.getDurationMSec = function () { + return this._$E ? -1 : this._$rr; + }), + (J.prototype.getLoopDurationMSec = function () { + return this._$rr; + }), + (J.prototype.dump = function () { + for (var t = 0; t < this.motions.length; t++) { + var i = this.motions[t]; + console.log("_$wL[%s] [%d]. ", i._$4P, i._$I0.length); + for (var e = 0; e < i._$I0.length && e < 10; e++) + console.log("%5.2f ,", i._$I0[e]); + console.log("\n"); + } + }), + (J.prototype.updateParamExe = function (t, i, e, r) { + for ( + var o = i - r._$z2, + n = (o * this._$D0) / 1e3, + s = 0 | n, + _ = n - s, + a = 0; + a < this.motions.length; + a++ + ) { + var h = this.motions[a], + l = h._$I0.length, + $ = h._$4P; + if (h._$RP == B._$hs) { + var u = h._$I0[s >= l ? l - 1 : s]; + t.setParamFloat($, u); + } else if (B._$ws <= h._$RP && h._$RP <= B._$Ys); + else { + var p, + f = t.getParamIndex($), + c = t.getModelContext(), + d = c.getParamMax(f), + g = c.getParamMin(f), + y = 0.4 * (d - g), + m = c.getParamFloat(f), + T = h._$I0[s >= l ? l - 1 : s], + P = h._$I0[s + 1 >= l ? l - 1 : s + 1]; + p = + (T < P && P - T > y) || (T > P && T - P > y) + ? T + : T + (P - T) * _; + var S = m + (p - m) * e; + t.setParamFloat($, S); + } + } + s >= this._$yT && + (this._$E + ? ((r._$z2 = i), this.loopFadeIn && (r._$bs = i)) + : (r._$9L = !0)), + (this._$eP = e); + }), + (J.prototype._$r0 = function () { + return this._$E; + }), + (J.prototype._$aL = function (t) { + this._$E = t; + }), + (J.prototype._$S0 = function () { + return this._$D0; + }), + (J.prototype._$U0 = function (t) { + this._$D0 = t; + }), + (J.prototype.isLoopFadeIn = function () { + return this.loopFadeIn; + }), + (J.prototype.setLoopFadeIn = function (t) { + this.loopFadeIn = t; + }), + (N.prototype.clear = function () { + this.size = 0; + }), + (N.prototype.add = function (t) { + if (this._$P.length <= this.size) { + var i = new Float32Array(2 * this.size); + w._$jT(this._$P, 0, i, 0, this.size), (this._$P = i); + } + this._$P[this.size++] = t; + }), + (N.prototype._$BL = function () { + var t = new Float32Array(this.size); + return w._$jT(this._$P, 0, t, 0, this.size), t; + }), + (B._$Fr = 0), + (B._$hs = 1), + (B._$ws = 100), + (B._$Ns = 101), + (B._$xs = 102), + (B._$us = 103), + (B._$qs = 104), + (B._$Ys = 105), + (Z.prototype = new I()), + (Z._$gT = new Array()), + (Z.prototype._$zP = function () { + (this._$GS = new D()), this._$GS._$zP(); + }), + (Z.prototype._$F0 = function (t) { + I.prototype._$F0.call(this, t), + (this._$A = t._$6L()), + (this._$o = t._$6L()), + (this._$GS = t._$nP()), + (this._$Eo = t._$nP()), + I.prototype.readV2_opacity.call(this, t); + }), + (Z.prototype.init = function (t) { + var i = new K(this), + e = (this._$o + 1) * (this._$A + 1); + return ( + null != i._$Cr && (i._$Cr = null), + (i._$Cr = new Float32Array(2 * e)), + null != i._$hr && (i._$hr = null), + this._$32() + ? (i._$hr = new Float32Array(2 * e)) + : (i._$hr = null), + i + ); + }), + (Z.prototype._$Nr = function (t, i) { + var e = i; + if (this._$GS._$Ur(t)) { + var r = this._$VT(), + o = Z._$gT; + (o[0] = !1), + v._$Vr(t, this._$GS, o, r, this._$Eo, e._$Cr, 0, 2), + i._$Ib(o[0]), + this.interpolateOpacity(t, this._$GS, i, o); + } + }), + (Z.prototype._$2b = function (t, i) { + var e = i; + if ((e._$hS(!0), this._$32())) { + var r = this.getTargetBaseDataID(); + if ( + (e._$8r == I._$ur && (e._$8r = t.getBaseDataIndex(r)), + e._$8r < 0) + ) + at._$so && _._$li("_$L _$0P _$G :: %s", r), e._$hS(!1); + else { + var o = t.getBaseData(e._$8r), + n = t._$q2(e._$8r); + if (null != o && n._$yo()) { + var s = n.getTotalScale(); + e.setTotalScale_notForClient(s); + var a = n.getTotalOpacity(); + e.setTotalOpacity(a * e.getInterpolatedOpacity()), + o._$nb(t, n, e._$Cr, e._$hr, this._$VT(), 0, 2), + e._$hS(!0); + } else e._$hS(!1); + } + } else e.setTotalOpacity(e.getInterpolatedOpacity()); + }), + (Z.prototype._$nb = function (t, i, e, r, o, n, s) { + var _ = i, + a = null != _._$hr ? _._$hr : _._$Cr; + Z.transformPoints_sdk2(e, r, o, n, s, a, this._$o, this._$A); + }), + (Z.transformPoints_sdk2 = function (i, e, r, o, n, s, _, a) { + for ( + var h, + l, + $, + u = r * n, + p = 0, + f = 0, + c = 0, + d = 0, + g = 0, + y = 0, + m = !1, + T = o; + T < u; + T += n + ) { + var P, S, v, L; + if ( + ((v = i[T]), + (L = i[T + 1]), + (P = v * _), + (S = L * a), + P < 0 || S < 0 || _ <= P || a <= S) + ) { + var M = _ + 1; + if (!m) { + (m = !0), + (p = + 0.25 * + (s[2 * (0 + 0 * M)] + + s[2 * (_ + 0 * M)] + + s[2 * (0 + a * M)] + + s[2 * (_ + a * M)])), + (f = + 0.25 * + (s[2 * (0 + 0 * M) + 1] + + s[2 * (_ + 0 * M) + 1] + + s[2 * (0 + a * M) + 1] + + s[2 * (_ + a * M) + 1])); + var E = s[2 * (_ + a * M)] - s[2 * (0 + 0 * M)], + A = s[2 * (_ + a * M) + 1] - s[2 * (0 + 0 * M) + 1], + I = s[2 * (_ + 0 * M)] - s[2 * (0 + a * M)], + w = s[2 * (_ + 0 * M) + 1] - s[2 * (0 + a * M) + 1]; + (c = 0.5 * (E + I)), + (d = 0.5 * (A + w)), + (g = 0.5 * (E - I)), + (y = 0.5 * (A - w)), + (p -= 0.5 * (c + g)), + (f -= 0.5 * (d + y)); + } + if (-2 < v && v < 3 && -2 < L && L < 3) + if (v <= 0) + if (L <= 0) { + var x = s[2 * (0 + 0 * M)], + O = s[2 * (0 + 0 * M) + 1], + D = p - 2 * c, + R = f - 2 * d, + b = p - 2 * g, + F = f - 2 * y, + C = p - 2 * c - 2 * g, + N = f - 2 * d - 2 * y, + B = 0.5 * (v - -2), + U = 0.5 * (L - -2); + B + U <= 1 + ? ((e[T] = C + (b - C) * B + (D - C) * U), + (e[T + 1] = N + (F - N) * B + (R - N) * U)) + : ((e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U)), + (e[T + 1] = + O + (R - O) * (1 - B) + (F - O) * (1 - U))); + } else if (L >= 1) { + var b = s[2 * (0 + a * M)], + F = s[2 * (0 + a * M) + 1], + C = p - 2 * c + 1 * g, + N = f - 2 * d + 1 * y, + x = p + 3 * g, + O = f + 3 * y, + D = p - 2 * c + 3 * g, + R = f - 2 * d + 3 * y, + B = 0.5 * (v - -2), + U = 0.5 * (L - 1); + B + U <= 1 + ? ((e[T] = C + (b - C) * B + (D - C) * U), + (e[T + 1] = N + (F - N) * B + (R - N) * U)) + : ((e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U)), + (e[T + 1] = + O + (R - O) * (1 - B) + (F - O) * (1 - U))); + } else { + var G = 0 | S; + G == a && (G = a - 1); + var B = 0.5 * (v - -2), + U = S - G, + Y = G / a, + k = (G + 1) / a, + b = s[2 * (0 + G * M)], + F = s[2 * (0 + G * M) + 1], + x = s[2 * (0 + (G + 1) * M)], + O = s[2 * (0 + (G + 1) * M) + 1], + C = p - 2 * c + Y * g, + N = f - 2 * d + Y * y, + D = p - 2 * c + k * g, + R = f - 2 * d + k * y; + B + U <= 1 + ? ((e[T] = C + (b - C) * B + (D - C) * U), + (e[T + 1] = N + (F - N) * B + (R - N) * U)) + : ((e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U)), + (e[T + 1] = + O + (R - O) * (1 - B) + (F - O) * (1 - U))); + } + else if (1 <= v) + if (L <= 0) { + var D = s[2 * (_ + 0 * M)], + R = s[2 * (_ + 0 * M) + 1], + x = p + 3 * c, + O = f + 3 * d, + C = p + 1 * c - 2 * g, + N = f + 1 * d - 2 * y, + b = p + 3 * c - 2 * g, + F = f + 3 * d - 2 * y, + B = 0.5 * (v - 1), + U = 0.5 * (L - -2); + B + U <= 1 + ? ((e[T] = C + (b - C) * B + (D - C) * U), + (e[T + 1] = N + (F - N) * B + (R - N) * U)) + : ((e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U)), + (e[T + 1] = + O + (R - O) * (1 - B) + (F - O) * (1 - U))); + } else if (L >= 1) { + var C = s[2 * (_ + a * M)], + N = s[2 * (_ + a * M) + 1], + b = p + 3 * c + 1 * g, + F = f + 3 * d + 1 * y, + D = p + 1 * c + 3 * g, + R = f + 1 * d + 3 * y, + x = p + 3 * c + 3 * g, + O = f + 3 * d + 3 * y, + B = 0.5 * (v - 1), + U = 0.5 * (L - 1); + B + U <= 1 + ? ((e[T] = C + (b - C) * B + (D - C) * U), + (e[T + 1] = N + (F - N) * B + (R - N) * U)) + : ((e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U)), + (e[T + 1] = + O + (R - O) * (1 - B) + (F - O) * (1 - U))); + } else { + var G = 0 | S; + G == a && (G = a - 1); + var B = 0.5 * (v - 1), + U = S - G, + Y = G / a, + k = (G + 1) / a, + C = s[2 * (_ + G * M)], + N = s[2 * (_ + G * M) + 1], + D = s[2 * (_ + (G + 1) * M)], + R = s[2 * (_ + (G + 1) * M) + 1], + b = p + 3 * c + Y * g, + F = f + 3 * d + Y * y, + x = p + 3 * c + k * g, + O = f + 3 * d + k * y; + B + U <= 1 + ? ((e[T] = C + (b - C) * B + (D - C) * U), + (e[T + 1] = N + (F - N) * B + (R - N) * U)) + : ((e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U)), + (e[T + 1] = + O + (R - O) * (1 - B) + (F - O) * (1 - U))); + } + else if (L <= 0) { + var V = 0 | P; + V == _ && (V = _ - 1); + var B = P - V, + U = 0.5 * (L - -2), + X = V / _, + z = (V + 1) / _, + D = s[2 * (V + 0 * M)], + R = s[2 * (V + 0 * M) + 1], + x = s[2 * (V + 1 + 0 * M)], + O = s[2 * (V + 1 + 0 * M) + 1], + C = p + X * c - 2 * g, + N = f + X * d - 2 * y, + b = p + z * c - 2 * g, + F = f + z * d - 2 * y; + B + U <= 1 + ? ((e[T] = C + (b - C) * B + (D - C) * U), + (e[T + 1] = N + (F - N) * B + (R - N) * U)) + : ((e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U)), + (e[T + 1] = O + (R - O) * (1 - B) + (F - O) * (1 - U))); + } else if (L >= 1) { + var V = 0 | P; + V == _ && (V = _ - 1); + var B = P - V, + U = 0.5 * (L - 1), + X = V / _, + z = (V + 1) / _, + C = s[2 * (V + a * M)], + N = s[2 * (V + a * M) + 1], + b = s[2 * (V + 1 + a * M)], + F = s[2 * (V + 1 + a * M) + 1], + D = p + X * c + 3 * g, + R = f + X * d + 3 * y, + x = p + z * c + 3 * g, + O = f + z * d + 3 * y; + B + U <= 1 + ? ((e[T] = C + (b - C) * B + (D - C) * U), + (e[T + 1] = N + (F - N) * B + (R - N) * U)) + : ((e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U)), + (e[T + 1] = O + (R - O) * (1 - B) + (F - O) * (1 - U))); + } else + t.err.printf( + "_$li calc : %.4f , %.4f\t\t\t\t\t@@BDBoxGrid\n", + v, + L + ); + else (e[T] = p + v * c + L * g), (e[T + 1] = f + v * d + L * y); + } else + (l = P - (0 | P)), + ($ = S - (0 | S)), + (h = 2 * ((0 | P) + (0 | S) * (_ + 1))), + l + $ < 1 + ? ((e[T] = + s[h] * (1 - l - $) + + s[h + 2] * l + + s[h + 2 * (_ + 1)] * $), + (e[T + 1] = + s[h + 1] * (1 - l - $) + + s[h + 3] * l + + s[h + 2 * (_ + 1) + 1] * $)) + : ((e[T] = + s[h + 2 * (_ + 1) + 2] * (l - 1 + $) + + s[h + 2 * (_ + 1)] * (1 - l) + + s[h + 2] * (1 - $)), + (e[T + 1] = + s[h + 2 * (_ + 1) + 3] * (l - 1 + $) + + s[h + 2 * (_ + 1) + 1] * (1 - l) + + s[h + 3] * (1 - $))); + } + }), + (Z.prototype.transformPoints_sdk1 = function (t, i, e, r, o, n, s) { + for ( + var _, + a, + h, + l, + $, + u, + p, + f = i, + c = this._$o, + d = this._$A, + g = o * s, + y = null != f._$hr ? f._$hr : f._$Cr, + m = n; + m < g; + m += s + ) + at._$ts + ? ((_ = e[m]), + (a = e[m + 1]), + _ < 0 ? (_ = 0) : _ > 1 && (_ = 1), + a < 0 ? (a = 0) : a > 1 && (a = 1), + (_ *= c), + (a *= d), + (h = 0 | _), + (l = 0 | a), + h > c - 1 && (h = c - 1), + l > d - 1 && (l = d - 1), + (u = _ - h), + (p = a - l), + ($ = 2 * (h + l * (c + 1)))) + : ((_ = e[m] * c), + (a = e[m + 1] * d), + (u = _ - (0 | _)), + (p = a - (0 | a)), + ($ = 2 * ((0 | _) + (0 | a) * (c + 1)))), + u + p < 1 + ? ((r[m] = + y[$] * (1 - u - p) + + y[$ + 2] * u + + y[$ + 2 * (c + 1)] * p), + (r[m + 1] = + y[$ + 1] * (1 - u - p) + + y[$ + 3] * u + + y[$ + 2 * (c + 1) + 1] * p)) + : ((r[m] = + y[$ + 2 * (c + 1) + 2] * (u - 1 + p) + + y[$ + 2 * (c + 1)] * (1 - u) + + y[$ + 2] * (1 - p)), + (r[m + 1] = + y[$ + 2 * (c + 1) + 3] * (u - 1 + p) + + y[$ + 2 * (c + 1) + 1] * (1 - u) + + y[$ + 3] * (1 - p))); + }), + (Z.prototype._$VT = function () { + return (this._$o + 1) * (this._$A + 1); + }), + (Z.prototype.getType = function () { + return I._$_b; + }), + (K.prototype = new _t()), + (tt._$42 = 0), + (tt.prototype._$zP = function () { + (this._$3S = new Array()), (this._$aS = new Array()); + }), + (tt.prototype._$F0 = function (t) { + (this._$g0 = t._$8L()), + (this.visible = t._$8L()), + (this._$NL = t._$nP()), + (this._$3S = t._$nP()), + (this._$aS = t._$nP()); + }), + (tt.prototype.init = function (t) { + var i = new it(this); + return i.setPartsOpacity(this.isVisible() ? 1 : 0), i; + }), + (tt.prototype._$6o = function (t) { + if (null == this._$3S) throw new Error("_$3S _$6 _$Wo@_$6o"); + this._$3S.push(t); + }), + (tt.prototype._$3o = function (t) { + if (null == this._$aS) throw new Error("_$aS _$6 _$Wo@_$3o"); + this._$aS.push(t); + }), + (tt.prototype._$Zo = function (t) { + this._$3S = t; + }), + (tt.prototype._$xo = function (t) { + this._$aS = t; + }), + (tt.prototype.isVisible = function () { + return this.visible; + }), + (tt.prototype._$uL = function () { + return this._$g0; + }), + (tt.prototype._$KP = function (t) { + this.visible = t; + }), + (tt.prototype._$ET = function (t) { + this._$g0 = t; + }), + (tt.prototype.getBaseData = function () { + return this._$3S; + }), + (tt.prototype.getDrawData = function () { + return this._$aS; + }), + (tt.prototype._$p2 = function () { + return this._$NL; + }), + (tt.prototype._$ob = function (t) { + this._$NL = t; + }), + (tt.prototype.getPartsID = function () { + return this._$NL; + }), + (tt.prototype._$MP = function (t) { + this._$NL = t; + }), + (it.prototype = new $()), + (it.prototype.getPartsOpacity = function () { + return this._$VS; + }), + (it.prototype.setPartsOpacity = function (t) { + this._$VS = t; + }), + (et._$L7 = function () { + u._$27(), yt._$27(), b._$27(), l._$27(); + }), + (et.prototype.toString = function () { + return this.id; + }), + (rt.prototype._$F0 = function (t) {}), + (ot.prototype._$1s = function () { + return this._$4S; + }), + (ot.prototype._$zP = function () { + this._$4S = new Array(); + }), + (ot.prototype._$F0 = function (t) { + this._$4S = t._$nP(); + }), + (ot.prototype._$Ks = function (t) { + this._$4S.push(t); + }), + (nt.tr = new gt()), + (nt._$50 = new gt()), + (nt._$Ti = new Array(0, 0)), + (nt._$Pi = new Array(0, 0)), + (nt._$B = new Array(0, 0)), + (nt.prototype._$lP = function (t, i, e, r) { + this.viewport = new Array(t, i, e, r); + }), + (nt.prototype._$bL = function () { + this.context.save(); + var t = this.viewport; + null != t && + (this.context.beginPath(), + this.context._$Li(t[0], t[1], t[2], t[3]), + this.context.clip()); + }), + (nt.prototype._$ei = function () { + this.context.restore(); + }), + (nt.prototype.drawElements = function (t, i, e, r, o, n, s, a) { + try { + o != this._$Qo && + ((this._$Qo = o), (this.context.globalAlpha = o)); + for ( + var h = i.length, + l = t.width, + $ = t.height, + u = this.context, + p = this._$xP, + f = this._$uP, + c = this._$6r, + d = this._$3r, + g = nt.tr, + y = nt._$Ti, + m = nt._$Pi, + T = nt._$B, + P = 0; + P < h; + P += 3 + ) { + u.save(); + var S = i[P], + v = i[P + 1], + L = i[P + 2], + M = p + c * e[2 * S], + E = f + d * e[2 * S + 1], + A = p + c * e[2 * v], + I = f + d * e[2 * v + 1], + w = p + c * e[2 * L], + x = f + d * e[2 * L + 1]; + s && + (s._$PS(M, E, T), + (M = T[0]), + (E = T[1]), + s._$PS(A, I, T), + (A = T[0]), + (I = T[1]), + s._$PS(w, x, T), + (w = T[0]), + (x = T[1])); + var O = l * r[2 * S], + D = $ - $ * r[2 * S + 1], + R = l * r[2 * v], + b = $ - $ * r[2 * v + 1], + F = l * r[2 * L], + C = $ - $ * r[2 * L + 1], + N = Math.atan2(b - D, R - O), + B = Math.atan2(I - E, A - M), + U = A - M, + G = I - E, + Y = Math.sqrt(U * U + G * G), + k = R - O, + V = b - D, + X = Math.sqrt(k * k + V * V), + z = Y / X; + It._$ni(F, C, O, D, R - O, b - D, -(b - D), R - O, y), + It._$ni(w, x, M, E, A - M, I - E, -(I - E), A - M, m); + var H = (m[0] - y[0]) / y[1], + W = Math.min(O, R, F), + j = Math.max(O, R, F), + q = Math.min(D, b, C), + J = Math.max(D, b, C), + Q = Math.floor(W), + Z = Math.floor(q), + K = Math.ceil(j), + tt = Math.ceil(J); + g.identity(), + g.translate(M, E), + g.rotate(B), + g.scale(1, m[1] / y[1]), + g.shear(H, 0), + g.scale(z, z), + g.rotate(-N), + g.translate(-O, -D), + g.setContext(u); + if ( + (n || (n = 1.2), + at.IGNORE_EXPAND && (n = 0), + at.USE_CACHED_POLYGON_IMAGE) + ) { + var it = a._$e0; + if ( + ((it.gl_cacheImage = it.gl_cacheImage || {}), + !it.gl_cacheImage[P]) + ) { + var et = nt.createCanvas(K - Q, tt - Z); + (at.DEBUG_DATA.LDGL_CANVAS_MB = + at.DEBUG_DATA.LDGL_CANVAS_MB || 0), + (at.DEBUG_DATA.LDGL_CANVAS_MB += (K - Q) * (tt - Z) * 4); + var rt = et.getContext("2d"); + rt.translate(-Q, -Z), + nt.clip(rt, g, n, Y, O, D, R, b, F, C, M, E, A, I, w, x), + rt.drawImage(t, 0, 0), + (it.gl_cacheImage[P] = { + cacheCanvas: et, + cacheContext: rt, + }); + } + u.drawImage(it.gl_cacheImage[P].cacheCanvas, Q, Z); + } else + at.IGNORE_CLIP || + nt.clip(u, g, n, Y, O, D, R, b, F, C, M, E, A, I, w, x), + at.USE_ADJUST_TRANSLATION && + ((W = 0), (j = l), (q = 0), (J = $)), + u.drawImage(t, W, q, j - W, J - q, W, q, j - W, J - q); + u.restore(); + } + } catch (t) { + _._$Rb(t); + } + }), + (nt.clip = function (t, i, e, r, o, n, s, _, a, h, l, $, u, p, f, c) { + e > 0.02 + ? nt.expandClip(t, i, e, r, l, $, u, p, f, c) + : nt.clipWithTransform(t, null, o, n, s, _, a, h); + }), + (nt.expandClip = function (t, i, e, r, o, n, s, _, a, h) { + var l = s - o, + $ = _ - n, + u = a - o, + p = h - n, + f = l * p - $ * u > 0 ? e : -e, + c = -$, + d = l, + g = a - s, + y = h - _, + m = -y, + T = g, + P = Math.sqrt(g * g + y * y), + S = -p, + v = u, + L = Math.sqrt(u * u + p * p), + M = o - (f * c) / r, + E = n - (f * d) / r, + A = s - (f * c) / r, + I = _ - (f * d) / r, + w = s - (f * m) / P, + x = _ - (f * T) / P, + O = a - (f * m) / P, + D = h - (f * T) / P, + R = o + (f * S) / L, + b = n + (f * v) / L, + F = a + (f * S) / L, + C = h + (f * v) / L, + N = nt._$50; + return ( + null != i._$P2(N) && + (nt.clipWithTransform(t, N, M, E, A, I, w, x, O, D, F, C, R, b), + !0) + ); + }), + (nt.clipWithTransform = function (t, i, e, r, o, n, s, a) { + if (arguments.length < 7) return void _._$li("err : @LDGL.clip()"); + if (!(arguments[1] instanceof gt)) + return void _._$li("err : a[0] is _$6 LDTransform @LDGL.clip()"); + var h = nt._$B, + l = i, + $ = arguments; + if ((t.beginPath(), l)) { + l._$PS($[2], $[3], h), t.moveTo(h[0], h[1]); + for (var u = 4; u < $.length; u += 2) + l._$PS($[u], $[u + 1], h), t.lineTo(h[0], h[1]); + } else { + t.moveTo($[2], $[3]); + for (var u = 4; u < $.length; u += 2) t.lineTo($[u], $[u + 1]); + } + t.clip(); + }), + (nt.createCanvas = function (t, i) { + var e = document.createElement("canvas"); + return ( + e.setAttribute("width", t), + e.setAttribute("height", i), + e || _._$li("err : " + e), + e + ); + }), + (nt.dumpValues = function () { + for (var t = "", i = 0; i < arguments.length; i++) + t += "[" + i + "]= " + arguments[i].toFixed(3) + " , "; + console.log(t); + }), + (st.prototype._$F0 = function (t) { + (this._$TT = t._$_T()), + (this._$LT = t._$_T()), + (this._$FS = t._$_T()), + (this._$wL = t._$nP()); + }), + (st.prototype.getMinValue = function () { + return this._$TT; + }), + (st.prototype.getMaxValue = function () { + return this._$LT; + }), + (st.prototype.getDefaultValue = function () { + return this._$FS; + }), + (st.prototype.getParamID = function () { + return this._$wL; + }), + (_t.prototype._$yo = function () { + return this._$AT && !this._$JS; + }), + (_t.prototype._$hS = function (t) { + this._$AT = t; + }), + (_t.prototype._$GT = function () { + return this._$e0; + }), + (_t.prototype._$l2 = function (t) { + this._$IP = t; + }), + (_t.prototype.getPartsIndex = function () { + return this._$IP; + }), + (_t.prototype._$x2 = function () { + return this._$JS; + }), + (_t.prototype._$Ib = function (t) { + this._$JS = t; + }), + (_t.prototype.getTotalScale = function () { + return this.totalScale; + }), + (_t.prototype.setTotalScale_notForClient = function (t) { + this.totalScale = t; + }), + (_t.prototype.getInterpolatedOpacity = function () { + return this._$7s; + }), + (_t.prototype.setInterpolatedOpacity = function (t) { + this._$7s = t; + }), + (_t.prototype.getTotalOpacity = function (t) { + return this.totalOpacity; + }), + (_t.prototype.setTotalOpacity = function (t) { + this.totalOpacity = t; + }), + (at._$2s = "2.1.00_1"), + (at._$Kr = 201001e3), + (at._$sP = !0), + (at._$so = !0), + (at._$cb = !1), + (at._$3T = !0), + (at._$Ts = !0), + (at._$fb = !0), + (at._$ts = !0), + (at.L2D_DEFORMER_EXTEND = !0), + (at._$Wb = !1); + (at._$yr = !1), + (at._$Zs = !1), + (at.L2D_NO_ERROR = 0), + (at._$i7 = 1e3), + (at._$9s = 1001), + (at._$es = 1100), + (at._$r7 = 2e3), + (at._$07 = 2001), + (at._$b7 = 2002), + (at._$H7 = 4e3), + (at.L2D_COLOR_BLEND_MODE_MULT = 0), + (at.L2D_COLOR_BLEND_MODE_ADD = 1), + (at.L2D_COLOR_BLEND_MODE_INTERPOLATE = 2), + (at._$6b = !0), + (at._$cT = 0), + (at.clippingMaskBufferSize = 256), + (at.glContext = new Array()), + (at.frameBuffers = new Array()), + (at.fTexture = new Array()), + (at.IGNORE_CLIP = !1), + (at.IGNORE_EXPAND = !1), + (at.EXPAND_W = 2), + (at.USE_ADJUST_TRANSLATION = !0), + (at.USE_CANVAS_TRANSFORM = !0), + (at.USE_CACHED_POLYGON_IMAGE = !1), + (at.DEBUG_DATA = {}), + (at.PROFILE_IOS_SPEED = { + PROFILE_NAME: "iOS Speed", + USE_ADJUST_TRANSLATION: !0, + USE_CACHED_POLYGON_IMAGE: !0, + EXPAND_W: 4, + }), + (at.PROFILE_IOS_QUALITY = { + PROFILE_NAME: "iOS HiQ", + USE_ADJUST_TRANSLATION: !0, + USE_CACHED_POLYGON_IMAGE: !1, + EXPAND_W: 2, + }), + (at.PROFILE_IOS_DEFAULT = at.PROFILE_IOS_QUALITY), + (at.PROFILE_ANDROID = { + PROFILE_NAME: "Android", + USE_ADJUST_TRANSLATION: !1, + USE_CACHED_POLYGON_IMAGE: !1, + EXPAND_W: 2, + }), + (at.PROFILE_DESKTOP = { + PROFILE_NAME: "Desktop", + USE_ADJUST_TRANSLATION: !1, + USE_CACHED_POLYGON_IMAGE: !1, + EXPAND_W: 2, + }), + (at.initProfile = function () { + Et.isIOS() + ? at.setupProfile(at.PROFILE_IOS_DEFAULT) + : Et.isAndroid() + ? at.setupProfile(at.PROFILE_ANDROID) + : at.setupProfile(at.PROFILE_DESKTOP); + }), + (at.setupProfile = function (t, i) { + if ("number" == typeof t) + switch (t) { + case 9901: + t = at.PROFILE_IOS_SPEED; + break; + case 9902: + t = at.PROFILE_IOS_QUALITY; + break; + case 9903: + t = at.PROFILE_IOS_DEFAULT; + break; + case 9904: + t = at.PROFILE_ANDROID; + break; + case 9905: + t = at.PROFILE_DESKTOP; + break; + default: + alert("profile _$6 _$Ui : " + t); + } + arguments.length < 2 && (i = !0), + i && console.log("profile : " + t.PROFILE_NAME); + for (var e in t) + (at[e] = t[e]), i && console.log(" [" + e + "] = " + t[e]); + }), + (at.init = function () { + if (at._$6b) { + console.log("Live2D %s", at._$2s), (at._$6b = !1); + !0, at.initProfile(); + } + }), + (at.getVersionStr = function () { + return at._$2s; + }), + (at.getVersionNo = function () { + return at._$Kr; + }), + (at._$sT = function (t) { + at._$cT = t; + }), + (at.getError = function () { + var t = at._$cT; + return (at._$cT = 0), t; + }), + (at.dispose = function () { + (at.glContext = []), (at.frameBuffers = []), (at.fTexture = []); + }), + (at.setGL = function (t, i) { + var e = i || 0; + at.glContext[e] = t; + }), + (at.getGL = function (t) { + return at.glContext[t]; + }), + (at.setClippingMaskBufferSize = function (t) { + at.clippingMaskBufferSize = t; + }), + (at.getClippingMaskBufferSize = function () { + return at.clippingMaskBufferSize; + }), + (at.deleteBuffer = function (t) { + at.getGL(t).deleteFramebuffer(at.frameBuffers[t].framebuffer), + delete at.frameBuffers[t], + delete at.glContext[t]; + }), + (ht._$r2 = function (t) { + return t < 0 ? 0 : t > 1 ? 1 : 0.5 - 0.5 * Math.cos(t * Lt.PI_F); + }), + (lt._$fr = -1), + (lt.prototype.toString = function () { + return this._$ib; + }), + ($t.prototype = new W()), + ($t._$42 = 0), + ($t._$Os = 30), + ($t._$ms = 0), + ($t._$ns = 1), + ($t._$_s = 2), + ($t._$gT = new Array()), + ($t.prototype._$_S = function (t) { + this._$LP = t; + }), + ($t.prototype.getTextureNo = function () { + return this._$LP; + }), + ($t.prototype._$ZL = function () { + return this._$Qi; + }), + ($t.prototype._$H2 = function () { + return this._$JP; + }), + ($t.prototype.getNumPoints = function () { + return this._$d0; + }), + ($t.prototype.getType = function () { + return W._$wb; + }), + ($t.prototype._$B2 = function (t, i, e) { + var r = i, + o = null != r._$hr ? r._$hr : r._$Cr; + switch (U._$do) { + default: + case U._$Ms: + throw new Error("_$L _$ro "); + case U._$Qs: + for (var n = this._$d0 - 1; n >= 0; --n) o[n * U._$No + 4] = e; + } + }), + ($t.prototype._$zP = function () { + (this._$GS = new D()), this._$GS._$zP(); + }), + ($t.prototype._$F0 = function (t) { + W.prototype._$F0.call(this, t), + (this._$LP = t._$6L()), + (this._$d0 = t._$6L()), + (this._$Yo = t._$6L()); + var i = t._$nP(); + this._$BP = new Int16Array(3 * this._$Yo); + for (var e = 3 * this._$Yo - 1; e >= 0; --e) this._$BP[e] = i[e]; + if ( + ((this._$Eo = t._$nP()), + (this._$Qi = t._$nP()), + t.getFormatVersion() >= G._$s7) + ) { + if (((this._$JP = t._$6L()), 0 != this._$JP)) { + if (0 != (1 & this._$JP)) { + var r = t._$6L(); + null == this._$5P && (this._$5P = new Object()), + (this._$5P._$Hb = parseInt(r)); + } + 0 != (this._$JP & $t._$Os) + ? (this._$6s = (this._$JP & $t._$Os) >> 1) + : (this._$6s = $t._$ms), + 0 != (32 & this._$JP) && (this.culling = !1); + } + } else this._$JP = 0; + }), + ($t.prototype.init = function (t) { + var i = new ut(this), + e = this._$d0 * U._$No, + r = this._$32(); + switch ( + (null != i._$Cr && (i._$Cr = null), + (i._$Cr = new Float32Array(e)), + null != i._$hr && (i._$hr = null), + (i._$hr = r ? new Float32Array(e) : null), + U._$do) + ) { + default: + case U._$Ms: + if (U._$Ls) + for (var o = this._$d0 - 1; o >= 0; --o) { + var n = o << 1; + this._$Qi[n + 1] = 1 - this._$Qi[n + 1]; + } + break; + case U._$Qs: + for (var o = this._$d0 - 1; o >= 0; --o) { + var n = o << 1, + s = o * U._$No, + _ = this._$Qi[n], + a = this._$Qi[n + 1]; + (i._$Cr[s] = _), + (i._$Cr[s + 1] = a), + (i._$Cr[s + 4] = 0), + r && + ((i._$hr[s] = _), + (i._$hr[s + 1] = a), + (i._$hr[s + 4] = 0)); + } + } + return i; + }), + ($t.prototype._$Nr = function (t, i) { + var e = i; + if ( + (this != e._$GT() && console.log("### assert!! ### "), + this._$GS._$Ur(t) && + (W.prototype._$Nr.call(this, t, e), !e._$IS[0])) + ) { + var r = $t._$gT; + (r[0] = !1), + v._$Vr( + t, + this._$GS, + r, + this._$d0, + this._$Eo, + e._$Cr, + U._$i2, + U._$No + ); + } + }), + ($t.prototype._$2b = function (t, i) { + try { + this != i._$GT() && console.log("### assert!! ### "); + var e = !1; + i._$IS[0] && (e = !0); + var r = i; + if (!e && (W.prototype._$2b.call(this, t), this._$32())) { + var o = this.getTargetBaseDataID(); + if ( + (r._$8r == W._$ur && (r._$8r = t.getBaseDataIndex(o)), + r._$8r < 0) + ) + at._$so && _._$li("_$L _$0P _$G :: %s", o); + else { + var n = t.getBaseData(r._$8r), + s = t._$q2(r._$8r); + null == n || s._$x2() + ? (r._$AT = !1) + : (n._$nb(t, s, r._$Cr, r._$hr, this._$d0, U._$i2, U._$No), + (r._$AT = !0)), + (r.baseOpacity = s.getTotalOpacity()); + } + } + } catch (t) { + throw t; + } + }), + ($t.prototype.draw = function (t, i, e) { + if ( + (this != e._$GT() && console.log("### assert!! ### "), !e._$IS[0]) + ) { + var r = e, + o = this._$LP; + o < 0 && (o = 1); + var n = this.getOpacity(i, r) * e._$VS * e.baseOpacity, + s = null != r._$hr ? r._$hr : r._$Cr; + t.setClipBufPre_clipContextForDraw(e.clipBufPre_clipContext), + t._$WP(this.culling), + t._$Uo( + o, + 3 * this._$Yo, + this._$BP, + s, + this._$Qi, + n, + this._$6s, + r + ); + } + }), + ($t.prototype.dump = function () { + console.log( + " _$yi( %d ) , _$d0( %d ) , _$Yo( %d ) \n", + this._$LP, + this._$d0, + this._$Yo + ), + console.log(" _$Oi _$di = { "); + for (var t = 0; t < this._$BP.length; t++) + console.log("%5d ,", this._$BP[t]); + console.log("\n _$5i _$30"); + for (var t = 0; t < this._$Eo.length; t++) { + console.log("\n _$30[%d] = ", t); + for (var i = this._$Eo[t], e = 0; e < i.length; e++) + console.log("%6.2f, ", i[e]); + } + console.log("\n"); + }), + ($t.prototype._$72 = function (t) { + return null == this._$5P ? null : this._$5P[t]; + }), + ($t.prototype.getIndexArray = function () { + return this._$BP; + }), + (ut.prototype = new Mt()), + (ut.prototype.getTransformedPoints = function () { + return null != this._$hr ? this._$hr : this._$Cr; + }), + (pt.prototype._$HT = function (t) { + (this.x = t.x), (this.y = t.y); + }), + (pt.prototype._$HT = function (t, i) { + (this.x = t), (this.y = i); + }), + (ft.prototype = new i()), + (ft.loadModel = function (t) { + var e = new ft(); + return i._$62(e, t), e; + }), + (ft.loadModel = function (t, e) { + var r = e || 0, + o = new ft(r); + return i._$62(o, t), o; + }), + (ft._$to = function () { + return new ft(); + }), + (ft._$er = function (t) { + var i = new _$5("../_$_r/_$t0/_$Ri/_$_P._$d"); + if (0 == i.exists()) + throw new _$ls("_$t0 _$_ _$6 _$Ui :: " + i._$PL()); + for ( + var e = [ + "../_$_r/_$t0/_$Ri/_$_P.512/_$CP._$1", + "../_$_r/_$t0/_$Ri/_$_P.512/_$vP._$1", + "../_$_r/_$t0/_$Ri/_$_P.512/_$EP._$1", + "../_$_r/_$t0/_$Ri/_$_P.512/_$pP._$1", + ], + r = ft.loadModel(i._$3b()), + o = 0; + o < e.length; + o++ + ) { + var n = new _$5(e[o]); + if (0 == n.exists()) + throw new _$ls("_$t0 _$_ _$6 _$Ui :: " + n._$PL()); + r.setTexture(o, _$nL._$_o(t, n._$3b())); + } + return r; + }), + (ft.prototype.setGL = function (t) { + at.setGL(t); + }), + (ft.prototype.setTransform = function (t) { + this.drawParamWebGL.setTransform(t); + }), + (ft.prototype.update = function () { + this._$5S.update(), this._$5S.preDraw(this.drawParamWebGL); + }), + (ft.prototype.draw = function () { + this._$5S.draw(this.drawParamWebGL); + }), + (ft.prototype._$K2 = function () { + this.drawParamWebGL._$K2(); + }), + (ft.prototype.setTexture = function (t, i) { + null == this.drawParamWebGL && + _._$li("_$Yi for QT _$ki / _$XS() is _$6 _$ui!!"), + this.drawParamWebGL.setTexture(t, i); + }), + (ft.prototype.setTexture = function (t, i) { + null == this.drawParamWebGL && + _._$li("_$Yi for QT _$ki / _$XS() is _$6 _$ui!!"), + this.drawParamWebGL.setTexture(t, i); + }), + (ft.prototype._$Rs = function () { + return this.drawParamWebGL._$Rs(); + }), + (ft.prototype._$Ds = function (t) { + this.drawParamWebGL._$Ds(t); + }), + (ft.prototype.getDrawParam = function () { + return this.drawParamWebGL; + }), + (ft.prototype.setMatrix = function (t) { + this.drawParamWebGL.setMatrix(t); + }), + (ft.prototype.setPremultipliedAlpha = function (t) { + this.drawParamWebGL.setPremultipliedAlpha(t); + }), + (ft.prototype.isPremultipliedAlpha = function () { + return this.drawParamWebGL.isPremultipliedAlpha(); + }), + (ft.prototype.setAnisotropy = function (t) { + this.drawParamWebGL.setAnisotropy(t); + }), + (ft.prototype.getAnisotropy = function () { + return this.drawParamWebGL.getAnisotropy(); + }), + (ct.prototype._$tb = function () { + return this.motions; + }), + (ct.prototype.startMotion = function (t, i) { + for (var e = null, r = this.motions.length, o = 0; o < r; ++o) + null != (e = this.motions[o]) && + (e._$qS(e._$w0.getFadeOut()), + this._$eb && + _._$Ji( + "MotionQueueManager[size:%2d]->startMotion() / start _$K _$3 (m%d)\n", + r, + e._$sr + )); + if (null == t) return -1; + (e = new dt()), (e._$w0 = t), this.motions.push(e); + var n = e._$sr; + return ( + this._$eb && + _._$Ji( + "MotionQueueManager[size:%2d]->startMotion() / new _$w0 (m%d)\n", + r, + n + ), + n + ); + }), + (ct.prototype.updateParam = function (t) { + try { + for (var i = !1, e = 0; e < this.motions.length; e++) { + var r = this.motions[e]; + if (null != r) { + var o = r._$w0; + null != o + ? (o.updateParam(t, r), + (i = !0), + r.isFinished() && + (this._$eb && + _._$Ji( + "MotionQueueManager[size:%2d]->updateParam() / _$T0 _$w0 (m%d)\n", + this.motions.length - 1, + r._$sr + ), + this.motions.splice(e, 1), + e--)) + : ((this.motions = this.motions.splice(e, 1)), e--); + } else this.motions.splice(e, 1), e--; + } + return i; + } catch (t) { + return _._$li(t), !0; + } + }), + (ct.prototype.isFinished = function (t) { + if (arguments.length >= 1) { + for (var i = 0; i < this.motions.length; i++) { + var e = this.motions[i]; + if (null != e && e._$sr == t && !e.isFinished()) return !1; + } + return !0; + } + for (var i = 0; i < this.motions.length; i++) { + var e = this.motions[i]; + if (null != e) { + if (null != e._$w0) { + if (!e.isFinished()) return !1; + } else this.motions.splice(i, 1), i--; + } else this.motions.splice(i, 1), i--; + } + return !0; + }), + (ct.prototype.stopAllMotions = function () { + for (var t = 0; t < this.motions.length; t++) { + var i = this.motions[t]; + if (null != i) { + i._$w0; + this.motions.splice(t, 1), t--; + } else this.motions.splice(t, 1), t--; + } + }), + (ct.prototype._$Zr = function (t) { + this._$eb = t; + }), + (ct.prototype._$e = function () { + console.log("-- _$R --\n"); + for (var t = 0; t < this.motions.length; t++) { + var i = this.motions[t], + e = i._$w0; + console.log( + "MotionQueueEnt[%d] :: %s\n", + this.motions.length, + e.toString() + ); + } + }), + (dt._$Gs = 0), + (dt.prototype.isFinished = function () { + return this._$9L; + }), + (dt.prototype._$qS = function (t) { + var i = w.getUserTimeMSec(), + e = i + t; + (this._$Do < 0 || e < this._$Do) && (this._$Do = e); + }), + (dt.prototype._$Bs = function () { + return this._$sr; + }), + (gt.prototype.setContext = function (t) { + var i = this.m; + t.transform(i[0], i[1], i[3], i[4], i[6], i[7]); + }), + (gt.prototype.toString = function () { + for (var t = "LDTransform { ", i = 0; i < 9; i++) + t += this.m[i].toFixed(2) + " ,"; + return (t += " }"); + }), + (gt.prototype.identity = function () { + var t = this.m; + (t[0] = t[4] = t[8] = 1), + (t[1] = t[2] = t[3] = t[5] = t[6] = t[7] = 0); + }), + (gt.prototype._$PS = function (t, i, e) { + null == e && (e = new Array(0, 0)); + var r = this.m; + return ( + (e[0] = r[0] * t + r[3] * i + r[6]), + (e[1] = r[1] * t + r[4] * i + r[7]), + e + ); + }), + (gt.prototype._$P2 = function (t) { + t || (t = new gt()); + var i = this.m, + e = i[0], + r = i[1], + o = i[2], + n = i[3], + s = i[4], + _ = i[5], + a = i[6], + h = i[7], + l = i[8], + $ = + e * s * l + + r * _ * a + + o * n * h - + e * _ * h - + o * s * a - + r * n * l; + if (0 == $) return null; + var u = 1 / $; + return ( + (t.m[0] = u * (s * l - h * _)), + (t.m[1] = u * (h * o - r * l)), + (t.m[2] = u * (r * _ - s * o)), + (t.m[3] = u * (a * _ - n * l)), + (t.m[4] = u * (e * l - a * o)), + (t.m[5] = u * (n * o - e * _)), + (t.m[6] = u * (n * h - a * s)), + (t.m[7] = u * (a * r - e * h)), + (t.m[8] = u * (e * s - n * r)), + t + ); + }), + (gt.prototype.transform = function (t, i, e) { + null == e && (e = new Array(0, 0)); + var r = this.m; + return ( + (e[0] = r[0] * t + r[3] * i + r[6]), + (e[1] = r[1] * t + r[4] * i + r[7]), + e + ); + }), + (gt.prototype.translate = function (t, i) { + var e = this.m; + (e[6] = e[0] * t + e[3] * i + e[6]), + (e[7] = e[1] * t + e[4] * i + e[7]), + (e[8] = e[2] * t + e[5] * i + e[8]); + }), + (gt.prototype.scale = function (t, i) { + var e = this.m; + (e[0] *= t), + (e[1] *= t), + (e[2] *= t), + (e[3] *= i), + (e[4] *= i), + (e[5] *= i); + }), + (gt.prototype.shear = function (t, i) { + var e = this.m, + r = e[0] + e[3] * i, + o = e[1] + e[4] * i, + n = e[2] + e[5] * i; + (e[3] = e[0] * t + e[3]), + (e[4] = e[1] * t + e[4]), + (e[5] = e[2] * t + e[5]), + (e[0] = r), + (e[1] = o), + (e[2] = n); + }), + (gt.prototype.rotate = function (t) { + var i = this.m, + e = Math.cos(t), + r = Math.sin(t), + o = i[0] * e + i[3] * r, + n = i[1] * e + i[4] * r, + s = i[2] * e + i[5] * r; + (i[3] = -i[0] * r + i[3] * e), + (i[4] = -i[1] * r + i[4] * e), + (i[5] = -i[2] * r + i[5] * e), + (i[0] = o), + (i[1] = n), + (i[2] = s); + }), + (gt.prototype.concatenate = function (t) { + var i = this.m, + e = t.m, + r = i[0] * e[0] + i[3] * e[1] + i[6] * e[2], + o = i[1] * e[0] + i[4] * e[1] + i[7] * e[2], + n = i[2] * e[0] + i[5] * e[1] + i[8] * e[2], + s = i[0] * e[3] + i[3] * e[4] + i[6] * e[5], + _ = i[1] * e[3] + i[4] * e[4] + i[7] * e[5], + a = i[2] * e[3] + i[5] * e[4] + i[8] * e[5], + h = i[0] * e[6] + i[3] * e[7] + i[6] * e[8], + l = i[1] * e[6] + i[4] * e[7] + i[7] * e[8], + $ = i[2] * e[6] + i[5] * e[7] + i[8] * e[8]; + (m[0] = r), + (m[1] = o), + (m[2] = n), + (m[3] = s), + (m[4] = _), + (m[5] = a), + (m[6] = h), + (m[7] = l), + (m[8] = $); + }), + (yt.prototype = new et()), + (yt._$eT = null), + (yt._$tP = new Object()), + (yt._$2o = function () { + return null == yt._$eT && (yt._$eT = yt.getID("DST_BASE")), yt._$eT; + }), + (yt._$27 = function () { + yt._$tP.clear(), (yt._$eT = null); + }), + (yt.getID = function (t) { + var i = yt._$tP[t]; + return null == i && ((i = new yt(t)), (yt._$tP[t] = i)), i; + }), + (yt.prototype._$3s = function () { + return new yt(); + }), + (mt.prototype = new E()), + (mt._$9r = function (t) { + return new Float32Array(t); + }), + (mt._$vb = function (t) { + return new Int16Array(t); + }), + (mt._$cr = function (t, i) { + return ( + null == t || t._$yL() < i.length + ? ((t = mt._$9r(2 * i.length)), t.put(i), t._$oT(0)) + : (t.clear(), t.put(i), t._$oT(0)), + t + ); + }), + (mt._$mb = function (t, i) { + return ( + null == t || t._$yL() < i.length + ? ((t = mt._$vb(2 * i.length)), t.put(i), t._$oT(0)) + : (t.clear(), t.put(i), t._$oT(0)), + t + ); + }), + (mt._$Hs = function () { + return this._$Gr; + }), + (mt._$as = function (t) { + this._$Gr = t; + }), + (mt.prototype.getGL = function () { + return this.gl; + }), + (mt.prototype.setGL = function (t) { + this.gl = t; + }), + (mt.prototype.setTransform = function (t) { + this.transform = t; + }), + (mt.prototype._$ZT = function () { + var t = this.gl; + this.firstDraw && + (this.initShader(), + (this.firstDraw = !1), + (this.anisotropyExt = + t.getExtension("EXT_texture_filter_anisotropic") || + t.getExtension("WEBKIT_EXT_texture_filter_anisotropic") || + t.getExtension("MOZ_EXT_texture_filter_anisotropic")), + this.anisotropyExt && + (this.maxAnisotropy = t.getParameter( + this.anisotropyExt.MAX_TEXTURE_MAX_ANISOTROPY_EXT + ))), + t.disable(t.SCISSOR_TEST), + t.disable(t.STENCIL_TEST), + t.disable(t.DEPTH_TEST), + t.frontFace(t.CW), + t.enable(t.BLEND), + t.colorMask(1, 1, 1, 1), + t.bindBuffer(t.ARRAY_BUFFER, null), + t.bindBuffer(t.ELEMENT_ARRAY_BUFFER, null); + }), + (mt.prototype._$Uo = function (t, i, e, r, o, n, s, _) { + if (!(n < 0.01 && null == this.clipBufPre_clipContextMask)) { + var a = (n > 0.9 && at.EXPAND_W, this.gl); + if (null == this.gl) throw new Error("gl is null"); + var h = 1 * this._$C0 * n, + l = 1 * this._$tT * n, + $ = 1 * this._$WL * n, + u = this._$lT * n; + if (null != this.clipBufPre_clipContextMask) { + a.frontFace(a.CCW), + a.useProgram(this.shaderProgram), + (this._$vS = Tt(a, this._$vS, r)), + (this._$no = Pt(a, this._$no, e)), + a.enableVertexAttribArray(this.a_position_Loc), + a.vertexAttribPointer( + this.a_position_Loc, + 2, + a.FLOAT, + !1, + 0, + 0 + ), + (this._$NT = Tt(a, this._$NT, o)), + a.activeTexture(a.TEXTURE1), + a.bindTexture(a.TEXTURE_2D, this.textures[t]), + a.uniform1i(this.s_texture0_Loc, 1), + a.enableVertexAttribArray(this.a_texCoord_Loc), + a.vertexAttribPointer( + this.a_texCoord_Loc, + 2, + a.FLOAT, + !1, + 0, + 0 + ), + a.uniformMatrix4fv( + this.u_matrix_Loc, + !1, + this.getClipBufPre_clipContextMask().matrixForMask + ); + var p = this.getClipBufPre_clipContextMask().layoutChannelNo, + f = this.getChannelFlagAsColor(p); + a.uniform4f(this.u_channelFlag, f.r, f.g, f.b, f.a); + var c = this.getClipBufPre_clipContextMask().layoutBounds; + a.uniform4f( + this.u_baseColor_Loc, + 2 * c.x - 1, + 2 * c.y - 1, + 2 * c._$EL() - 1, + 2 * c._$5T() - 1 + ), + a.uniform1i(this.u_maskFlag_Loc, !0); + } else if (null != this.getClipBufPre_clipContextDraw()) { + a.useProgram(this.shaderProgramOff), + (this._$vS = Tt(a, this._$vS, r)), + (this._$no = Pt(a, this._$no, e)), + a.enableVertexAttribArray(this.a_position_Loc_Off), + a.vertexAttribPointer( + this.a_position_Loc_Off, + 2, + a.FLOAT, + !1, + 0, + 0 + ), + (this._$NT = Tt(a, this._$NT, o)), + a.activeTexture(a.TEXTURE1), + a.bindTexture(a.TEXTURE_2D, this.textures[t]), + a.uniform1i(this.s_texture0_Loc_Off, 1), + a.enableVertexAttribArray(this.a_texCoord_Loc_Off), + a.vertexAttribPointer( + this.a_texCoord_Loc_Off, + 2, + a.FLOAT, + !1, + 0, + 0 + ), + a.uniformMatrix4fv( + this.u_clipMatrix_Loc_Off, + !1, + this.getClipBufPre_clipContextDraw().matrixForDraw + ), + a.uniformMatrix4fv(this.u_matrix_Loc_Off, !1, this.matrix4x4), + a.activeTexture(a.TEXTURE2), + a.bindTexture(a.TEXTURE_2D, at.fTexture[this.glno]), + a.uniform1i(this.s_texture1_Loc_Off, 2); + var p = this.getClipBufPre_clipContextDraw().layoutChannelNo, + f = this.getChannelFlagAsColor(p); + a.uniform4f(this.u_channelFlag_Loc_Off, f.r, f.g, f.b, f.a), + a.uniform4f(this.u_baseColor_Loc_Off, h, l, $, u); + } else + a.useProgram(this.shaderProgram), + (this._$vS = Tt(a, this._$vS, r)), + (this._$no = Pt(a, this._$no, e)), + a.enableVertexAttribArray(this.a_position_Loc), + a.vertexAttribPointer( + this.a_position_Loc, + 2, + a.FLOAT, + !1, + 0, + 0 + ), + (this._$NT = Tt(a, this._$NT, o)), + a.activeTexture(a.TEXTURE1), + a.bindTexture(a.TEXTURE_2D, this.textures[t]), + a.uniform1i(this.s_texture0_Loc, 1), + a.enableVertexAttribArray(this.a_texCoord_Loc), + a.vertexAttribPointer( + this.a_texCoord_Loc, + 2, + a.FLOAT, + !1, + 0, + 0 + ), + a.uniformMatrix4fv(this.u_matrix_Loc, !1, this.matrix4x4), + a.uniform4f(this.u_baseColor_Loc, h, l, $, u), + a.uniform1i(this.u_maskFlag_Loc, !1); + this.culling + ? this.gl.enable(a.CULL_FACE) + : this.gl.disable(a.CULL_FACE), + this.gl.enable(a.BLEND); + var d, g, y, m; + if (null != this.clipBufPre_clipContextMask) + (d = a.ONE), + (g = a.ONE_MINUS_SRC_ALPHA), + (y = a.ONE), + (m = a.ONE_MINUS_SRC_ALPHA); + else + switch (s) { + case $t._$ms: + (d = a.ONE), + (g = a.ONE_MINUS_SRC_ALPHA), + (y = a.ONE), + (m = a.ONE_MINUS_SRC_ALPHA); + break; + case $t._$ns: + (d = a.ONE), (g = a.ONE), (y = a.ZERO), (m = a.ONE); + break; + case $t._$_s: + (d = a.DST_COLOR), + (g = a.ONE_MINUS_SRC_ALPHA), + (y = a.ZERO), + (m = a.ONE); + } + a.blendEquationSeparate(a.FUNC_ADD, a.FUNC_ADD), + a.blendFuncSeparate(d, g, y, m), + this.anisotropyExt && + a.texParameteri( + a.TEXTURE_2D, + this.anisotropyExt.TEXTURE_MAX_ANISOTROPY_EXT, + this.maxAnisotropy + ); + var T = e.length; + a.drawElements(a.TRIANGLES, T, a.UNSIGNED_SHORT, 0), + a.bindTexture(a.TEXTURE_2D, null); + } + }), + (mt.prototype._$Rs = function () { + throw new Error("_$Rs"); + }), + (mt.prototype._$Ds = function (t) { + throw new Error("_$Ds"); + }), + (mt.prototype._$K2 = function () { + for (var t = 0; t < this.textures.length; t++) { + 0 != this.textures[t] && + (this.gl._$K2(1, this.textures, t), (this.textures[t] = null)); + } + }), + (mt.prototype.setTexture = function (t, i) { + this.textures[t] = i; + }), + (mt.prototype.initShader = function () { + var t = this.gl; + this.loadShaders2(), + (this.a_position_Loc = t.getAttribLocation( + this.shaderProgram, + "a_position" + )), + (this.a_texCoord_Loc = t.getAttribLocation( + this.shaderProgram, + "a_texCoord" + )), + (this.u_matrix_Loc = t.getUniformLocation( + this.shaderProgram, + "u_mvpMatrix" + )), + (this.s_texture0_Loc = t.getUniformLocation( + this.shaderProgram, + "s_texture0" + )), + (this.u_channelFlag = t.getUniformLocation( + this.shaderProgram, + "u_channelFlag" + )), + (this.u_baseColor_Loc = t.getUniformLocation( + this.shaderProgram, + "u_baseColor" + )), + (this.u_maskFlag_Loc = t.getUniformLocation( + this.shaderProgram, + "u_maskFlag" + )), + (this.a_position_Loc_Off = t.getAttribLocation( + this.shaderProgramOff, + "a_position" + )), + (this.a_texCoord_Loc_Off = t.getAttribLocation( + this.shaderProgramOff, + "a_texCoord" + )), + (this.u_matrix_Loc_Off = t.getUniformLocation( + this.shaderProgramOff, + "u_mvpMatrix" + )), + (this.u_clipMatrix_Loc_Off = t.getUniformLocation( + this.shaderProgramOff, + "u_ClipMatrix" + )), + (this.s_texture0_Loc_Off = t.getUniformLocation( + this.shaderProgramOff, + "s_texture0" + )), + (this.s_texture1_Loc_Off = t.getUniformLocation( + this.shaderProgramOff, + "s_texture1" + )), + (this.u_channelFlag_Loc_Off = t.getUniformLocation( + this.shaderProgramOff, + "u_channelFlag" + )), + (this.u_baseColor_Loc_Off = t.getUniformLocation( + this.shaderProgramOff, + "u_baseColor" + )); + }), + (mt.prototype.disposeShader = function () { + var t = this.gl; + this.shaderProgram && + (t.deleteProgram(this.shaderProgram), + (this.shaderProgram = null)), + this.shaderProgramOff && + (t.deleteProgram(this.shaderProgramOff), + (this.shaderProgramOff = null)); + }), + (mt.prototype.compileShader = function (t, i) { + var e = this.gl, + r = i, + o = e.createShader(t); + if (null == o) return _._$Ji("_$L0 to create shader"), null; + if ( + (e.shaderSource(o, r), + e.compileShader(o), + !e.getShaderParameter(o, e.COMPILE_STATUS)) + ) { + var n = e.getShaderInfoLog(o); + return ( + _._$Ji("_$L0 to compile shader : " + n), e.deleteShader(o), null + ); + } + return o; + }), + (mt.prototype.loadShaders2 = function () { + var t = this.gl; + if (((this.shaderProgram = t.createProgram()), !this.shaderProgram)) + return !1; + if ( + ((this.shaderProgramOff = t.createProgram()), + !this.shaderProgramOff) + ) + return !1; + if ( + ((this.vertShader = this.compileShader( + t.VERTEX_SHADER, + "attribute vec4 a_position;attribute vec2 a_texCoord;varying vec2 v_texCoord;varying vec4 v_ClipPos;uniform mat4 u_mvpMatrix;void main(){ gl_Position = u_mvpMatrix * a_position; v_ClipPos = u_mvpMatrix * a_position; v_texCoord = a_texCoord;}" + )), + !this.vertShader) + ) + return _._$Ji("Vertex shader compile _$li!"), !1; + if ( + ((this.vertShaderOff = this.compileShader( + t.VERTEX_SHADER, + "attribute vec4 a_position;attribute vec2 a_texCoord;varying vec2 v_texCoord;varying vec4 v_ClipPos;uniform mat4 u_mvpMatrix;uniform mat4 u_ClipMatrix;void main(){ gl_Position = u_mvpMatrix * a_position; v_ClipPos = u_ClipMatrix * a_position; v_texCoord = a_texCoord ;}" + )), + !this.vertShaderOff) + ) + return _._$Ji("OffVertex shader compile _$li!"), !1; + if ( + ((this.fragShader = this.compileShader( + t.FRAGMENT_SHADER, + "precision mediump float;varying vec2 v_texCoord;varying vec4 v_ClipPos;uniform sampler2D s_texture0;uniform vec4 u_channelFlag;uniform vec4 u_baseColor;uniform bool u_maskFlag;void main(){ vec4 smpColor; if(u_maskFlag){ float isInside = step(u_baseColor.x, v_ClipPos.x/v_ClipPos.w) * step(u_baseColor.y, v_ClipPos.y/v_ClipPos.w) * step(v_ClipPos.x/v_ClipPos.w, u_baseColor.z) * step(v_ClipPos.y/v_ClipPos.w, u_baseColor.w); smpColor = u_channelFlag * texture2D(s_texture0 , v_texCoord).a * isInside; }else{ smpColor = texture2D(s_texture0 , v_texCoord) * u_baseColor; } gl_FragColor = smpColor;}" + )), + !this.fragShader) + ) + return _._$Ji("Fragment shader compile _$li!"), !1; + if ( + ((this.fragShaderOff = this.compileShader( + t.FRAGMENT_SHADER, + "precision mediump float ;varying vec2 v_texCoord;varying vec4 v_ClipPos;uniform sampler2D s_texture0;uniform sampler2D s_texture1;uniform vec4 u_channelFlag;uniform vec4 u_baseColor ;void main(){ vec4 col_formask = texture2D(s_texture0, v_texCoord) * u_baseColor; vec4 clipMask = texture2D(s_texture1, v_ClipPos.xy / v_ClipPos.w) * u_channelFlag; float maskVal = clipMask.r + clipMask.g + clipMask.b + clipMask.a; col_formask = col_formask * maskVal; gl_FragColor = col_formask;}" + )), + !this.fragShaderOff) + ) + return _._$Ji("OffFragment shader compile _$li!"), !1; + if ( + (t.attachShader(this.shaderProgram, this.vertShader), + t.attachShader(this.shaderProgram, this.fragShader), + t.attachShader(this.shaderProgramOff, this.vertShaderOff), + t.attachShader(this.shaderProgramOff, this.fragShaderOff), + t.linkProgram(this.shaderProgram), + t.linkProgram(this.shaderProgramOff), + !t.getProgramParameter(this.shaderProgram, t.LINK_STATUS)) + ) { + var i = t.getProgramInfoLog(this.shaderProgram); + return ( + _._$Ji("_$L0 to link program: " + i), + this.vertShader && + (t.deleteShader(this.vertShader), (this.vertShader = 0)), + this.fragShader && + (t.deleteShader(this.fragShader), (this.fragShader = 0)), + this.shaderProgram && + (t.deleteProgram(this.shaderProgram), + (this.shaderProgram = 0)), + this.vertShaderOff && + (t.deleteShader(this.vertShaderOff), + (this.vertShaderOff = 0)), + this.fragShaderOff && + (t.deleteShader(this.fragShaderOff), + (this.fragShaderOff = 0)), + this.shaderProgramOff && + (t.deleteProgram(this.shaderProgramOff), + (this.shaderProgramOff = 0)), + !1 + ); + } + return !0; + }), + (mt.prototype.createFramebuffer = function () { + var t = this.gl, + i = at.clippingMaskBufferSize, + e = t.createFramebuffer(); + t.bindFramebuffer(t.FRAMEBUFFER, e); + var r = t.createRenderbuffer(); + t.bindRenderbuffer(t.RENDERBUFFER, r), + t.renderbufferStorage(t.RENDERBUFFER, t.RGBA4, i, i), + t.framebufferRenderbuffer( + t.FRAMEBUFFER, + t.COLOR_ATTACHMENT0, + t.RENDERBUFFER, + r + ); + var o = t.createTexture(); + return ( + t.bindTexture(t.TEXTURE_2D, o), + t.texImage2D( + t.TEXTURE_2D, + 0, + t.RGBA, + i, + i, + 0, + t.RGBA, + t.UNSIGNED_BYTE, + null + ), + t.texParameteri(t.TEXTURE_2D, t.TEXTURE_MIN_FILTER, t.LINEAR), + t.texParameteri(t.TEXTURE_2D, t.TEXTURE_MAG_FILTER, t.LINEAR), + t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_S, t.CLAMP_TO_EDGE), + t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_T, t.CLAMP_TO_EDGE), + t.framebufferTexture2D( + t.FRAMEBUFFER, + t.COLOR_ATTACHMENT0, + t.TEXTURE_2D, + o, + 0 + ), + t.bindTexture(t.TEXTURE_2D, null), + t.bindRenderbuffer(t.RENDERBUFFER, null), + t.bindFramebuffer(t.FRAMEBUFFER, null), + (at.fTexture[this.glno] = o), + { + framebuffer: e, + renderbuffer: r, + texture: at.fTexture[this.glno], + } + ); + }), + (St.prototype._$fP = function () { + var t, + i, + e, + r = this._$ST(); + if (0 == (128 & r)) return 255 & r; + if (0 == (128 & (t = this._$ST()))) + return ((127 & r) << 7) | (127 & t); + if (0 == (128 & (i = this._$ST()))) + return ((127 & r) << 14) | ((127 & t) << 7) | (255 & i); + if (0 == (128 & (e = this._$ST()))) + return ( + ((127 & r) << 21) | + ((127 & t) << 14) | + ((127 & i) << 7) | + (255 & e) + ); + throw new lt("_$L _$0P _"); + }), + (St.prototype.getFormatVersion = function () { + return this._$S2; + }), + (St.prototype._$gr = function (t) { + this._$S2 = t; + }), + (St.prototype._$3L = function () { + return this._$fP(); + }), + (St.prototype._$mP = function () { + return ( + this._$zT(), (this._$F += 8), this._$T.getFloat64(this._$F - 8) + ); + }), + (St.prototype._$_T = function () { + return ( + this._$zT(), (this._$F += 4), this._$T.getFloat32(this._$F - 4) + ); + }), + (St.prototype._$6L = function () { + return ( + this._$zT(), (this._$F += 4), this._$T.getInt32(this._$F - 4) + ); + }), + (St.prototype._$ST = function () { + return this._$zT(), this._$T.getInt8(this._$F++); + }), + (St.prototype._$9T = function () { + return ( + this._$zT(), (this._$F += 2), this._$T.getInt16(this._$F - 2) + ); + }), + (St.prototype._$2T = function () { + throw (this._$zT(), (this._$F += 8), new lt("_$L _$q read long")); + }), + (St.prototype._$po = function () { + return this._$zT(), 0 != this._$T.getInt8(this._$F++); + }); + var xt = !0; + (St.prototype._$bT = function () { + this._$zT(); + var t = this._$3L(), + i = null; + if (xt) + try { + var e = new ArrayBuffer(2 * t); + i = new Uint16Array(e); + for (var r = 0; r < t; ++r) i[r] = this._$T.getUint8(this._$F++); + return String.fromCharCode.apply(null, i); + } catch (t) { + xt = !1; + } + try { + var o = new Array(); + if (null == i) + for (var r = 0; r < t; ++r) o[r] = this._$T.getUint8(this._$F++); + else for (var r = 0; r < t; ++r) o[r] = i[r]; + return String.fromCharCode.apply(null, o); + } catch (t) { + console.log("read utf8 / _$rT _$L0 !! : " + t); + } + }), + (St.prototype._$cS = function () { + this._$zT(); + for (var t = this._$3L(), i = new Int32Array(t), e = 0; e < t; e++) + (i[e] = this._$T.getInt32(this._$F)), (this._$F += 4); + return i; + }), + (St.prototype._$Tb = function () { + this._$zT(); + for ( + var t = this._$3L(), i = new Float32Array(t), e = 0; + e < t; + e++ + ) + (i[e] = this._$T.getFloat32(this._$F)), (this._$F += 4); + return i; + }), + (St.prototype._$5b = function () { + this._$zT(); + for ( + var t = this._$3L(), i = new Float64Array(t), e = 0; + e < t; + e++ + ) + (i[e] = this._$T.getFloat64(this._$F)), (this._$F += 8); + return i; + }), + (St.prototype._$nP = function () { + return this._$Jb(-1); + }), + (St.prototype._$Jb = function (t) { + if ((this._$zT(), t < 0 && (t = this._$3L()), t == G._$7P)) { + var i = this._$6L(); + if (0 <= i && i < this._$Ko.length) return this._$Ko[i]; + throw new lt("_$sL _$4i @_$m0"); + } + var e = this._$4b(t); + return this._$Ko.push(e), e; + }), + (St.prototype._$4b = function (t) { + if (0 == t) return null; + if (50 == t) { + var i = this._$bT(), + e = b.getID(i); + return e; + } + if (51 == t) { + var i = this._$bT(), + e = yt.getID(i); + return e; + } + if (134 == t) { + var i = this._$bT(), + e = l.getID(i); + return e; + } + if (60 == t) { + var i = this._$bT(), + e = u.getID(i); + return e; + } + if (t >= 48) { + var r = G._$9o(t); + return null != r ? (r._$F0(this), r) : null; + } + switch (t) { + case 1: + return this._$bT(); + case 10: + return new n(this._$6L(), !0); + case 11: + return new S( + this._$mP(), + this._$mP(), + this._$mP(), + this._$mP() + ); + case 12: + return new S( + this._$_T(), + this._$_T(), + this._$_T(), + this._$_T() + ); + case 13: + return new L(this._$mP(), this._$mP()); + case 14: + return new L(this._$_T(), this._$_T()); + case 15: + for (var o = this._$3L(), e = new Array(o), s = 0; s < o; s++) + e[s] = this._$nP(); + return e; + case 17: + var e = new F( + this._$mP(), + this._$mP(), + this._$mP(), + this._$mP(), + this._$mP(), + this._$mP() + ); + return e; + case 21: + return new h( + this._$6L(), + this._$6L(), + this._$6L(), + this._$6L() + ); + case 22: + return new pt(this._$6L(), this._$6L()); + case 23: + throw new Error("_$L _$ro "); + case 16: + case 25: + return this._$cS(); + case 26: + return this._$5b(); + case 27: + return this._$Tb(); + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 18: + case 19: + case 20: + case 24: + case 28: + throw new lt("_$6 _$q : _$nP() of 2-9 ,18,19,20,24,28 : " + t); + default: + throw new lt("_$6 _$q : _$nP() NO _$i : " + t); + } + }), + (St.prototype._$8L = function () { + return ( + 0 == this._$hL + ? (this._$v0 = this._$ST()) + : 8 == this._$hL && + ((this._$v0 = this._$ST()), (this._$hL = 0)), + 1 == ((this._$v0 >> (7 - this._$hL++)) & 1) + ); + }), + (St.prototype._$zT = function () { + 0 != this._$hL && (this._$hL = 0); + }), + (vt.prototype._$wP = function (t, i, e) { + for (var r = 0; r < e; r++) { + for (var o = 0; o < i; o++) { + var n = 2 * (o + r * i); + console.log("(% 7.3f , % 7.3f) , ", t[n], t[n + 1]); + } + console.log("\n"); + } + console.log("\n"); + }), + (Lt._$2S = Math.PI / 180), + (Lt._$bS = Math.PI / 180), + (Lt._$wS = 180 / Math.PI), + (Lt._$NS = 180 / Math.PI), + (Lt.PI_F = Math.PI), + (Lt._$kT = [ + 0, 0.012368, 0.024734, 0.037097, 0.049454, 0.061803, 0.074143, + 0.086471, 0.098786, 0.111087, 0.12337, 0.135634, 0.147877, 0.160098, + 0.172295, 0.184465, 0.196606, 0.208718, 0.220798, 0.232844, + 0.244854, 0.256827, 0.268761, 0.280654, 0.292503, 0.304308, + 0.316066, 0.327776, 0.339436, 0.351044, 0.362598, 0.374097, + 0.385538, 0.396921, 0.408243, 0.419502, 0.430697, 0.441826, + 0.452888, 0.463881, 0.474802, 0.485651, 0.496425, 0.507124, + 0.517745, 0.528287, 0.538748, 0.549126, 0.559421, 0.56963, 0.579752, + 0.589785, 0.599728, 0.609579, 0.619337, 0.629, 0.638567, 0.648036, + 0.657406, 0.666676, 0.675843, 0.684908, 0.693867, 0.70272, 0.711466, + 0.720103, 0.72863, 0.737045, 0.745348, 0.753536, 0.76161, 0.769566, + 0.777405, 0.785125, 0.792725, 0.800204, 0.807561, 0.814793, + 0.821901, 0.828884, 0.835739, 0.842467, 0.849066, 0.855535, + 0.861873, 0.868079, 0.874153, 0.880093, 0.885898, 0.891567, + 0.897101, 0.902497, 0.907754, 0.912873, 0.917853, 0.922692, 0.92739, + 0.931946, 0.936359, 0.940629, 0.944755, 0.948737, 0.952574, + 0.956265, 0.959809, 0.963207, 0.966457, 0.96956, 0.972514, 0.97532, + 0.977976, 0.980482, 0.982839, 0.985045, 0.987101, 0.989006, + 0.990759, 0.992361, 0.993811, 0.995109, 0.996254, 0.997248, + 0.998088, 0.998776, 0.999312, 0.999694, 0.999924, 1, + ]), + (Lt._$92 = function (t, i) { + var e = Math.atan2(t[1], t[0]), + r = Math.atan2(i[1], i[0]); + return Lt._$tS(e, r); + }), + (Lt._$tS = function (t, i) { + for (var e = t - i; e < -Math.PI; ) e += 2 * Math.PI; + for (; e > Math.PI; ) e -= 2 * Math.PI; + return e; + }), + (Lt._$9 = function (t) { + return Math.sin(t); + }), + (Lt.fcos = function (t) { + return Math.cos(t); + }), + (Mt.prototype._$u2 = function () { + return this._$IS[0]; + }), + (Mt.prototype._$yo = function () { + return this._$AT && !this._$IS[0]; + }), + (Mt.prototype._$GT = function () { + return this._$e0; + }), + (Et._$W2 = 0), + (Et.SYSTEM_INFO = null), + (Et.USER_AGENT = navigator.userAgent), + (Et.isIPhone = function () { + return Et.SYSTEM_INFO || Et.setup(), Et.SYSTEM_INFO._isIPhone; + }), + (Et.isIOS = function () { + return ( + Et.SYSTEM_INFO || Et.setup(), + Et.SYSTEM_INFO._isIPhone || Et.SYSTEM_INFO._isIPad + ); + }), + (Et.isAndroid = function () { + return Et.SYSTEM_INFO || Et.setup(), Et.SYSTEM_INFO._isAndroid; + }), + (Et.getOSVersion = function () { + return Et.SYSTEM_INFO || Et.setup(), Et.SYSTEM_INFO.version; + }), + (Et.getOS = function () { + return ( + Et.SYSTEM_INFO || Et.setup(), + Et.SYSTEM_INFO._isIPhone || Et.SYSTEM_INFO._isIPad + ? "iOS" + : Et.SYSTEM_INFO._isAndroid + ? "Android" + : "_$Q0 OS" + ); + }), + (Et.setup = function () { + function t(t, i) { + for ( + var e = t.substring(i).split(/[ _,;\.]/), r = 0, o = 0; + o <= 2 && !isNaN(e[o]); + o++ + ) { + var n = parseInt(e[o]); + if (n < 0 || n > 999) { + _._$li("err : " + n + " @UtHtml5.setup()"), (r = 0); + break; + } + r += n * Math.pow(1e3, 2 - o); + } + return r; + } + var i, + e = Et.USER_AGENT, + r = (Et.SYSTEM_INFO = { userAgent: e }); + if ((i = e.indexOf("iPhone OS ")) >= 0) + (r.os = "iPhone"), + (r._isIPhone = !0), + (r.version = t(e, i + "iPhone OS ".length)); + else if ((i = e.indexOf("iPad")) >= 0) { + if ((i = e.indexOf("CPU OS")) < 0) + return void _._$li(" err : " + e + " @UtHtml5.setup()"); + (r.os = "iPad"), + (r._isIPad = !0), + (r.version = t(e, i + "CPU OS ".length)); + } else + (i = e.indexOf("Android")) >= 0 + ? ((r.os = "Android"), + (r._isAndroid = !0), + (r.version = t(e, i + "Android ".length))) + : ((r.os = "-"), (r.version = -1)); + }), + (window.UtSystem = w), + (window.UtDebug = _), + (window.LDTransform = gt), + (window.LDGL = nt), + (window.Live2D = at), + (window.Live2DModelWebGL = ft), + (window.Live2DModelJS = q), + (window.Live2DMotion = J), + (window.MotionQueueManager = ct), + (window.PhysicsHair = f), + (window.AMotion = s), + (window.PartsDataID = l), + (window.DrawDataID = b), + (window.BaseDataID = yt), + (window.ParamID = u), + at.init(); + var At = !1; + })(); + }).call(i, e(7)); + }, + function (t, i) { + t.exports = { + import: function () { + throw new Error("System.import cannot be used indirectly"); + }, + }; + }, + function (t, i, e) { + "use strict"; + function r(t) { + return t && t.__esModule ? t : { default: t }; + } + function o() { + (this.models = []), + (this.count = -1), + (this.reloadFlg = !1), + Live2D.init(), + n.Live2DFramework.setPlatformManager(new _.default()); + } + Object.defineProperty(i, "__esModule", { value: !0 }), (i.default = o); + var n = e(0), + s = e(9), + _ = r(s), + a = e(10), + h = r(a), + l = e(1), + $ = r(l); + (o.prototype.createModel = function () { + var t = new h.default(); + return this.models.push(t), t; + }), + (o.prototype.changeModel = function (t, i) { + if (this.reloadFlg) { + this.reloadFlg = !1; + this.releaseModel(0, t), + this.createModel(), + this.models[0].load(t, i); + } + }), + (o.prototype.getModel = function (t) { + return t >= this.models.length ? null : this.models[t]; + }), + (o.prototype.releaseModel = function (t, i) { + this.models.length <= t || + (this.models[t].release(i), + delete this.models[t], + this.models.splice(t, 1)); + }), + (o.prototype.numModels = function () { + return this.models.length; + }), + (o.prototype.setDrag = function (t, i) { + for (var e = 0; e < this.models.length; e++) + this.models[e].setDrag(t, i); + }), + (o.prototype.maxScaleEvent = function () { + $.default.DEBUG_LOG && console.log("Max scale event."); + for (var t = 0; t < this.models.length; t++) + this.models[t].startRandomMotion( + $.default.MOTION_GROUP_PINCH_IN, + $.default.PRIORITY_NORMAL + ); + }), + (o.prototype.minScaleEvent = function () { + $.default.DEBUG_LOG && console.log("Min scale event."); + for (var t = 0; t < this.models.length; t++) + this.models[t].startRandomMotion( + $.default.MOTION_GROUP_PINCH_OUT, + $.default.PRIORITY_NORMAL + ); + }), + (o.prototype.tapEvent = function (t, i) { + $.default.DEBUG_LOG && console.log("tapEvent view x:" + t + " y:" + i); + for (var e = 0; e < this.models.length; e++) + this.models[e].hitTest($.default.HIT_AREA_HEAD, t, i) + ? ($.default.DEBUG_LOG && console.log("Tap face."), + this.models[e].setRandomExpression()) + : this.models[e].hitTest($.default.HIT_AREA_BODY, t, i) + ? ($.default.DEBUG_LOG && + console.log("Tap body. models[" + e + "]"), + this.models[e].startRandomMotion( + $.default.MOTION_GROUP_TAP_BODY, + $.default.PRIORITY_NORMAL + )) + : this.models[e].hitTestCustom("head", t, i) + ? ($.default.DEBUG_LOG && console.log("Tap face."), + this.models[e].startRandomMotion( + $.default.MOTION_GROUP_FLICK_HEAD, + $.default.PRIORITY_NORMAL + )) + : this.models[e].hitTestCustom("body", t, i) && + ($.default.DEBUG_LOG && + console.log("Tap body. models[" + e + "]"), + this.models[e].startRandomMotion( + $.default.MOTION_GROUP_TAP_BODY, + $.default.PRIORITY_NORMAL + )); + return !0; + }); + }, + function (t, i, e) { + "use strict"; + function r() {} + Object.defineProperty(i, "__esModule", { value: !0 }), (i.default = r); + var o = e(2); + var requestCache = {}; + (r.prototype.loadBytes = function (t, i) { + if (requestCache[t] !== undefined) { + i(requestCache[t]); + return; + } + var e = new XMLHttpRequest(); + e.open("GET", t, !0), + (e.responseType = "arraybuffer"), + (e.onload = function () { + switch (e.status) { + case 200: + requestCache[t] = e.response; + i(e.response); + break; + default: + console.error("Failed to load (" + e.status + ") : " + t); + } + }), + e.send(null); + }), + (r.prototype.loadString = function (t) { + this.loadBytes(t, function (t) { + return t; + }); + }), + (r.prototype.loadLive2DModel = function (t, i) { + var e = null; + this.loadBytes(t, function (t) { + (e = Live2DModelWebGL.loadModel(t)), i(e); + }); + }), + (r.prototype.loadTexture = function (t, i, e, r) { + var n = new Image(); + (n.crossOrigin = "Anonymous"), (n.src = e); + (n.onload = function () { + var e = (0, o.getContext)(), + s = e.createTexture(); + if (!s) + return console.error("Failed to generate gl texture name."), -1; + 0 == t.isPremultipliedAlpha() && + e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL, 1), + e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL, 1), + e.activeTexture(e.TEXTURE0), + e.bindTexture(e.TEXTURE_2D, s), + e.texImage2D(e.TEXTURE_2D, 0, e.RGBA, e.RGBA, e.UNSIGNED_BYTE, n), + e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MAG_FILTER, e.LINEAR), + e.texParameteri( + e.TEXTURE_2D, + e.TEXTURE_MIN_FILTER, + e.LINEAR_MIPMAP_NEAREST + ), + e.generateMipmap(e.TEXTURE_2D), + t.setTexture(i, s), + (s = null), + "function" == typeof r && r(); + }), + (n.onerror = function () { + console.error("Failed to load image : " + e); + }); + }), + (r.prototype.jsonParseFromBytes = function (t) { + var i, + e = new Uint8Array(t, 0, 3); + return ( + (i = + 239 == e[0] && 187 == e[1] && 191 == e[2] + ? String.fromCharCode.apply(null, new Uint8Array(t, 3)) + : String.fromCharCode.apply(null, new Uint8Array(t))), + JSON.parse(i) + ); + }), + (r.prototype.log = function (t) {}); + }, + function (t, i, e) { + "use strict"; + function r(t) { + return t && t.__esModule ? t : { default: t }; + } + function o() { + n.L2DBaseModel.prototype.constructor.call(this), + (this.modelHomeDir = ""), + (this.modelSetting = null), + (this.tmpMatrix = []); + } + Object.defineProperty(i, "__esModule", { value: !0 }), (i.default = o); + var n = e(0), + s = e(11), + _ = r(s), + a = e(1), + h = r(a), + l = e(3), + $ = r(l); + (o.prototype = new n.L2DBaseModel()), + (o.prototype.load = function (t, i, e) { + this.setUpdating(!0), + this.setInitialized(!1), + (this.modelHomeDir = i.substring(0, i.lastIndexOf("/") + 1)), + (this.modelSetting = new _.default()); + var r = this; + this.modelSetting.loadModelSetting(i, function () { + var t = r.modelHomeDir + r.modelSetting.getModelFile(); + r.loadModelData(t, function (t) { + for (var i = 0; i < r.modelSetting.getTextureNum(); i++) { + if (/^https?:\/\/|^\/\//i.test(r.modelSetting.getTextureFile(i))) + var o = r.modelSetting.getTextureFile(i); + else var o = r.modelHomeDir + r.modelSetting.getTextureFile(i); + r.loadTexture(i, o, function () { + if (r.isTexLoaded) { + if (r.modelSetting.getExpressionNum() > 0) { + r.expressions = {}; + for ( + var t = 0; + t < r.modelSetting.getExpressionNum(); + t++ + ) { + var i = r.modelSetting.getExpressionName(t), + o = + r.modelHomeDir + r.modelSetting.getExpressionFile(t); + r.loadExpression(i, o); + } + } else (r.expressionManager = null), (r.expressions = {}); + if ( + (r.eyeBlink, + null != r.modelSetting.getPhysicsFile() + ? r.loadPhysics( + r.modelHomeDir + r.modelSetting.getPhysicsFile() + ) + : (r.physics = null), + null != r.modelSetting.getPoseFile() + ? r.loadPose( + r.modelHomeDir + r.modelSetting.getPoseFile(), + function () { + r.pose.updateParam(r.live2DModel); + } + ) + : (r.pose = null), + null != r.modelSetting.getLayout()) + ) { + var n = r.modelSetting.getLayout(); + null != n.width && r.modelMatrix.setWidth(n.width), + null != n.height && r.modelMatrix.setHeight(n.height), + null != n.x && r.modelMatrix.setX(n.x), + null != n.y && r.modelMatrix.setY(n.y), + null != n.center_x && r.modelMatrix.centerX(n.center_x), + null != n.center_y && r.modelMatrix.centerY(n.center_y), + null != n.top && r.modelMatrix.top(n.top), + null != n.bottom && r.modelMatrix.bottom(n.bottom), + null != n.left && r.modelMatrix.left(n.left), + null != n.right && r.modelMatrix.right(n.right); + } + if (null != r.modelSetting.getHitAreasCustom()) { + var s = r.modelSetting.getHitAreasCustom(); + null != s.head_x && + (h.default.hit_areas_custom_head_x = s.head_x), + null != s.head_y && + (h.default.hit_areas_custom_head_y = s.head_y), + null != s.body_x && + (h.default.hit_areas_custom_body_x = s.body_x), + null != s.body_y && + (h.default.hit_areas_custom_body_y = s.body_y); + } + for (var t = 0; t < r.modelSetting.getInitParamNum(); t++) + r.live2DModel.setParamFloat( + r.modelSetting.getInitParamID(t), + r.modelSetting.getInitParamValue(t) + ); + for ( + var t = 0; + t < r.modelSetting.getInitPartsVisibleNum(); + t++ + ) + r.live2DModel.setPartsOpacity( + r.modelSetting.getInitPartsVisibleID(t), + r.modelSetting.getInitPartsVisibleValue(t) + ); + r.live2DModel.saveParam(), + r.preloadMotionGroup(h.default.MOTION_GROUP_IDLE), + r.preloadMotionGroup(h.default.MOTION_GROUP_SLEEPY), + r.mainMotionManager.stopAllMotions(), + r.setUpdating(!1), + r.setInitialized(!0), + "function" == typeof e && e(); + } + }); + } + }); + }); + }), + (o.prototype.release = function (t) { + var i = n.Live2DFramework.getPlatformManager(); + t.deleteTexture(i.texture); + }), + (o.prototype.preloadMotionGroup = function (t) { + for (var i = this, e = 0; e < this.modelSetting.getMotionNum(t); e++) { + var r = this.modelSetting.getMotionFile(t, e); + this.loadMotion(r, this.modelHomeDir + r, function (r) { + r.setFadeIn(i.modelSetting.getMotionFadeIn(t, e)), + r.setFadeOut(i.modelSetting.getMotionFadeOut(t, e)); + }); + } + }), + (o.prototype.update = function () { + if (null == this.live2DModel) + return void ( + h.default.DEBUG_LOG && console.error("Failed to update.") + ); + var t = UtSystem.getUserTimeMSec() - this.startTimeMSec, + i = t / 1e3, + e = 2 * i * Math.PI; + if (this.mainMotionManager.isFinished()) { + "1" === sessionStorage.getItem("Sleepy") + ? this.startRandomMotion( + h.default.MOTION_GROUP_SLEEPY, + h.default.PRIORITY_SLEEPY + ) + : this.startRandomMotion( + h.default.MOTION_GROUP_IDLE, + h.default.PRIORITY_IDLE + ); + } + this.live2DModel.loadParam(), + this.mainMotionManager.updateParam(this.live2DModel) || + (null != this.eyeBlink && + this.eyeBlink.updateParam(this.live2DModel)), + this.live2DModel.saveParam(), + null == this.expressionManager || + null == this.expressions || + this.expressionManager.isFinished() || + this.expressionManager.updateParam(this.live2DModel), + this.live2DModel.addToParamFloat("PARAM_ANGLE_X", 30 * this.dragX, 1), + this.live2DModel.addToParamFloat("PARAM_ANGLE_Y", 30 * this.dragY, 1), + this.live2DModel.addToParamFloat( + "PARAM_ANGLE_Z", + this.dragX * this.dragY * -30, + 1 + ), + this.live2DModel.addToParamFloat( + "PARAM_BODY_ANGLE_X", + 10 * this.dragX, + 1 + ), + this.live2DModel.addToParamFloat("PARAM_EYE_BALL_X", this.dragX, 1), + this.live2DModel.addToParamFloat("PARAM_EYE_BALL_Y", this.dragY, 1), + this.live2DModel.addToParamFloat( + "PARAM_ANGLE_X", + Number(15 * Math.sin(e / 6.5345)), + 0.5 + ), + this.live2DModel.addToParamFloat( + "PARAM_ANGLE_Y", + Number(8 * Math.sin(e / 3.5345)), + 0.5 + ), + this.live2DModel.addToParamFloat( + "PARAM_ANGLE_Z", + Number(10 * Math.sin(e / 5.5345)), + 0.5 + ), + this.live2DModel.addToParamFloat( + "PARAM_BODY_ANGLE_X", + Number(4 * Math.sin(e / 15.5345)), + 0.5 + ), + this.live2DModel.setParamFloat( + "PARAM_BREATH", + Number(0.5 + 0.5 * Math.sin(e / 3.2345)), + 1 + ), + null != this.physics && this.physics.updateParam(this.live2DModel), + null == this.lipSync && + this.live2DModel.setParamFloat( + "PARAM_MOUTH_OPEN_Y", + this.lipSyncValue + ), + null != this.pose && this.pose.updateParam(this.live2DModel), + this.live2DModel.update(); + }), + (o.prototype.setRandomExpression = function () { + var t = []; + for (var i in this.expressions) t.push(i); + var e = parseInt(Math.random() * t.length); + this.setExpression(t[e]); + }), + (o.prototype.startRandomMotion = function (t, i) { + var e = this.modelSetting.getMotionNum(t), + r = parseInt(Math.random() * e); + this.startMotion(t, r, i); + }), + (o.prototype.startMotion = function (t, i, e) { + var r = this.modelSetting.getMotionFile(t, i); + if (null == r || "" == r) + return void ( + h.default.DEBUG_LOG && console.error("Failed to motion.") + ); + if (e == h.default.PRIORITY_FORCE) + this.mainMotionManager.setReservePriority(e); + else if (!this.mainMotionManager.reserveMotion(e)) + return void ( + h.default.DEBUG_LOG && console.log("Motion is running.") + ); + var o, + n = this; + null == this.motions[t] + ? this.loadMotion(null, this.modelHomeDir + r, function (r) { + (o = r), n.setFadeInFadeOut(t, i, e, o); + }) + : ((o = this.motions[t]), n.setFadeInFadeOut(t, i, e, o)); + }), + (o.prototype.setFadeInFadeOut = function (t, i, e, r) { + var o = this.modelSetting.getMotionFile(t, i); + if ( + (r.setFadeIn(this.modelSetting.getMotionFadeIn(t, i)), + r.setFadeOut(this.modelSetting.getMotionFadeOut(t, i)), + h.default.DEBUG_LOG && console.log("Start motion : " + o), + null == this.modelSetting.getMotionSound(t, i)) + ) + this.mainMotionManager.startMotionPrio(r, e); + else { + var n = this.modelSetting.getMotionSound(t, i), + s = document.createElement("audio"); + (s.src = this.modelHomeDir + n), + h.default.DEBUG_LOG && console.log("Start sound : " + n), + s.play(), + this.mainMotionManager.startMotionPrio(r, e); + } + }), + (o.prototype.setExpression = function (t) { + var i = this.expressions[t]; + h.default.DEBUG_LOG && console.log("Expression : " + t), + this.expressionManager.startMotion(i, !1); + }), + (o.prototype.draw = function (t) { + $.default.push(), + $.default.multMatrix(this.modelMatrix.getArray()), + (this.tmpMatrix = $.default.getMatrix()), + this.live2DModel.setMatrix(this.tmpMatrix), + this.live2DModel.draw(), + $.default.pop(); + }), + (o.prototype.hitTest = function (t, i, e) { + for (var r = this.modelSetting.getHitAreaNum(), o = 0; o < r; o++) + if (t == this.modelSetting.getHitAreaName(o)) { + var n = this.modelSetting.getHitAreaID(o); + return this.hitTestSimple(n, i, e); + } + return !1; + }), + (o.prototype.hitTestCustom = function (t, i, e) { + return "head" == t + ? this.hitTestSimpleCustom( + h.default.hit_areas_custom_head_x, + h.default.hit_areas_custom_head_y, + i, + e + ) + : "body" == t && + this.hitTestSimpleCustom( + h.default.hit_areas_custom_body_x, + h.default.hit_areas_custom_body_y, + i, + e + ); + }); + }, + function (t, i, e) { + "use strict"; + function r() { + (this.NAME = "name"), + (this.ID = "id"), + (this.MODEL = "model"), + (this.TEXTURES = "textures"), + (this.HIT_AREAS = "hit_areas"), + (this.PHYSICS = "physics"), + (this.POSE = "pose"), + (this.EXPRESSIONS = "expressions"), + (this.MOTION_GROUPS = "motions"), + (this.SOUND = "sound"), + (this.FADE_IN = "fade_in"), + (this.FADE_OUT = "fade_out"), + (this.LAYOUT = "layout"), + (this.HIT_AREAS_CUSTOM = "hit_areas_custom"), + (this.INIT_PARAM = "init_param"), + (this.INIT_PARTS_VISIBLE = "init_parts_visible"), + (this.VALUE = "val"), + (this.FILE = "file"), + (this.json = {}); + } + Object.defineProperty(i, "__esModule", { value: !0 }), (i.default = r); + var o = e(0); + (r.prototype.loadModelSetting = function (t, i) { + var e = this; + o.Live2DFramework.getPlatformManager().loadBytes(t, function (t) { + var r = String.fromCharCode.apply(null, new Uint8Array(t)); + (e.json = JSON.parse(r)), i(); + }); + }), + (r.prototype.getTextureFile = function (t) { + return null == this.json[this.TEXTURES] || + null == this.json[this.TEXTURES][t] + ? null + : this.json[this.TEXTURES][t]; + }), + (r.prototype.getModelFile = function () { + return this.json[this.MODEL]; + }), + (r.prototype.getTextureNum = function () { + return null == this.json[this.TEXTURES] + ? 0 + : this.json[this.TEXTURES].length; + }), + (r.prototype.getHitAreaNum = function () { + return null == this.json[this.HIT_AREAS] + ? 0 + : this.json[this.HIT_AREAS].length; + }), + (r.prototype.getHitAreaID = function (t) { + return null == this.json[this.HIT_AREAS] || + null == this.json[this.HIT_AREAS][t] + ? null + : this.json[this.HIT_AREAS][t][this.ID]; + }), + (r.prototype.getHitAreaName = function (t) { + return null == this.json[this.HIT_AREAS] || + null == this.json[this.HIT_AREAS][t] + ? null + : this.json[this.HIT_AREAS][t][this.NAME]; + }), + (r.prototype.getPhysicsFile = function () { + return this.json[this.PHYSICS]; + }), + (r.prototype.getPoseFile = function () { + return this.json[this.POSE]; + }), + (r.prototype.getExpressionNum = function () { + return null == this.json[this.EXPRESSIONS] + ? 0 + : this.json[this.EXPRESSIONS].length; + }), + (r.prototype.getExpressionFile = function (t) { + return null == this.json[this.EXPRESSIONS] + ? null + : this.json[this.EXPRESSIONS][t][this.FILE]; + }), + (r.prototype.getExpressionName = function (t) { + return null == this.json[this.EXPRESSIONS] + ? null + : this.json[this.EXPRESSIONS][t][this.NAME]; + }), + (r.prototype.getLayout = function () { + return this.json[this.LAYOUT]; + }), + (r.prototype.getHitAreasCustom = function () { + return this.json[this.HIT_AREAS_CUSTOM]; + }), + (r.prototype.getInitParamNum = function () { + return null == this.json[this.INIT_PARAM] + ? 0 + : this.json[this.INIT_PARAM].length; + }), + (r.prototype.getMotionNum = function (t) { + return null == this.json[this.MOTION_GROUPS] || + null == this.json[this.MOTION_GROUPS][t] + ? 0 + : this.json[this.MOTION_GROUPS][t].length; + }), + (r.prototype.getMotionFile = function (t, i) { + return null == this.json[this.MOTION_GROUPS] || + null == this.json[this.MOTION_GROUPS][t] || + null == this.json[this.MOTION_GROUPS][t][i] + ? null + : this.json[this.MOTION_GROUPS][t][i][this.FILE]; + }), + (r.prototype.getMotionSound = function (t, i) { + return null == this.json[this.MOTION_GROUPS] || + null == this.json[this.MOTION_GROUPS][t] || + null == this.json[this.MOTION_GROUPS][t][i] || + null == this.json[this.MOTION_GROUPS][t][i][this.SOUND] + ? null + : this.json[this.MOTION_GROUPS][t][i][this.SOUND]; + }), + (r.prototype.getMotionFadeIn = function (t, i) { + return null == this.json[this.MOTION_GROUPS] || + null == this.json[this.MOTION_GROUPS][t] || + null == this.json[this.MOTION_GROUPS][t][i] || + null == this.json[this.MOTION_GROUPS][t][i][this.FADE_IN] + ? 1e3 + : this.json[this.MOTION_GROUPS][t][i][this.FADE_IN]; + }), + (r.prototype.getMotionFadeOut = function (t, i) { + return null == this.json[this.MOTION_GROUPS] || + null == this.json[this.MOTION_GROUPS][t] || + null == this.json[this.MOTION_GROUPS][t][i] || + null == this.json[this.MOTION_GROUPS][t][i][this.FADE_OUT] + ? 1e3 + : this.json[this.MOTION_GROUPS][t][i][this.FADE_OUT]; + }), + (r.prototype.getInitParamID = function (t) { + return null == this.json[this.INIT_PARAM] || + null == this.json[this.INIT_PARAM][t] + ? null + : this.json[this.INIT_PARAM][t][this.ID]; + }), + (r.prototype.getInitParamValue = function (t) { + return null == this.json[this.INIT_PARAM] || + null == this.json[this.INIT_PARAM][t] + ? NaN + : this.json[this.INIT_PARAM][t][this.VALUE]; + }), + (r.prototype.getInitPartsVisibleNum = function () { + return null == this.json[this.INIT_PARTS_VISIBLE] + ? 0 + : this.json[this.INIT_PARTS_VISIBLE].length; + }), + (r.prototype.getInitPartsVisibleID = function (t) { + return null == this.json[this.INIT_PARTS_VISIBLE] || + null == this.json[this.INIT_PARTS_VISIBLE][t] + ? null + : this.json[this.INIT_PARTS_VISIBLE][t][this.ID]; + }), + (r.prototype.getInitPartsVisibleValue = function (t) { + return null == this.json[this.INIT_PARTS_VISIBLE] || + null == this.json[this.INIT_PARTS_VISIBLE][t] + ? NaN + : this.json[this.INIT_PARTS_VISIBLE][t][this.VALUE]; + }); + }, +]); diff --git a/packages/live2d/src/live2d/model.ts b/packages/live2d/src/live2d/model.ts index c6546ef..8afbed0 100644 --- a/packages/live2d/src/live2d/model.ts +++ b/packages/live2d/src/live2d/model.ts @@ -1,5 +1,5 @@ +import type { Live2dConfig } from "../context/config-context"; import { sendMessage } from "../helpers/sendMessage"; -import type { Live2dConfig } from "../types"; import { isNotEmptyString } from "../util/isString"; declare const loadlive2d: any; @@ -20,8 +20,9 @@ interface ModelResult { class Model { #apiPath: string; #config: Live2dConfig; + #live2dRootElement: HTMLElement; - constructor(config: Live2dConfig) { + constructor(root: HTMLElement, config: Live2dConfig) { const apiPath = config.apiPath; if (!isNotEmptyString(apiPath)) { throw new Error("Invalid initWidget argument!"); @@ -29,6 +30,20 @@ class Model { this.#apiPath = apiPath.endsWith("/") ? apiPath : `${apiPath}/`; this.#config = config; + this.#live2dRootElement = root; + + this._loadingModel(); + } + + private _loadingModel() { + let modelId = localStorage.getItem("modelId"); + let modelTexturesId = localStorage.getItem("modelTexturesId"); + if (modelId === null || !!this.#config.isForceUseDefaultConfig) { + // 加载指定模型的指定材质 + modelId = String(this.#config.modelId || 1); // 模型 ID + modelTexturesId = String(this.#config.modelTexturesId || 53); // 材质 ID + } + this.loadModel(Number(modelId), Number(modelTexturesId), "Live2D 模型加载中..."); } /** @@ -38,17 +53,17 @@ class Model { * @param modelTexturesId 纹理编号 * @param text 加载时的消息 */ - async loadModel(modelId: number, modelTexturesId: number, text: string) { + async loadModel(modelId: number, modelTexturesId: number, text?: string) { localStorage.setItem("modelId", String(modelId)); localStorage.setItem("modelTexturesId", String(modelTexturesId)); // 发送消息事件 - sendMessage(text, 4000, 3); + if (text) { + sendMessage(text, 4000, 3); + } loadlive2d( - "live2d", + this.#live2dRootElement, `${this.#apiPath}get/?id=${modelId}-${modelTexturesId}`, - this.#config.consoleShowStatus === true - ? console.log(`[Status] Live2D 模型 ${modelId}-${modelTexturesId} 加载完成`) - : null + console.log(`[Status] Live2D 模型 ${modelId}-${modelTexturesId} 加载完成`) ); } diff --git a/packages/live2d/src/types/index.ts b/packages/live2d/src/types/index.ts deleted file mode 100644 index 55345db..0000000 --- a/packages/live2d/src/types/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -export interface Live2dToggleEventDetail { - // 是否显示看板娘 - isShow: boolean; -} - -export interface Live2dMessageEventDetail { - // 消息内容 - text: string; - // 消息显示时间 - timeout: number; - // 消息优先级 - priority: number; -} \ No newline at end of file diff --git a/packages/live2d/src/util/distinctArray.ts b/packages/live2d/src/util/distinctArray.ts new file mode 100644 index 0000000..4286249 --- /dev/null +++ b/packages/live2d/src/util/distinctArray.ts @@ -0,0 +1,7 @@ +export const distinctArray = (arr: T[], key: string) => { + const map = new Map(); + for (const item of arr) { + map.set(item[key], item); + } + return [...map.values()]; +} \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7df699b..4286167 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,6 +17,9 @@ importers: packages/live2d: dependencies: + '@lit/context': + specifier: ^1.1.3 + version: 1.1.3 '@lit/react': specifier: ^1.0.7 version: 1.0.7(@types/react@19.0.8) @@ -524,6 +527,9 @@ packages: '@lit-labs/ssr-dom-shim@1.3.0': resolution: {integrity: sha512-nQIWonJ6eFAvUUrSlwyHDm/aE8PBDu5kRpL0vHMg6K8fK3Diq1xdPjTnsJSwxABhaZ+5eBi1btQB5ShUTKo4nQ==} + '@lit/context@1.1.3': + resolution: {integrity: sha512-Auh37F4S0PZM93HTDfZWs97mmzaQ7M3vnTc9YvxAGyP3UItSK/8Fs0vTOGT+njuvOwbKio/l8Cx/zWL4vkutpQ==} + '@lit/react@1.0.7': resolution: {integrity: sha512-cencnwwLXQKiKxjfFzSgZRngcWJzUDZi/04E0fSaF86wZgchMdvTyu+lE36DrUfvuus3bH8+xLPrhM1cTjwpzw==} peerDependencies: @@ -1757,6 +1763,10 @@ snapshots: '@lit-labs/ssr-dom-shim@1.3.0': {} + '@lit/context@1.1.3': + dependencies: + '@lit/reactive-element': 2.0.4 + '@lit/react@1.0.7(@types/react@19.0.8)': dependencies: '@types/react': 19.0.8 From c8af98bee2a152915ccd4beef9b123f59a1e8de6 Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Thu, 13 Feb 2025 02:29:35 +0800 Subject: [PATCH 06/12] refactor: complete refactoring of user message registration feature --- packages/live2d/src/common/UnoLitElement.ts | 2 +- .../live2d/src/components/Live2dCanvas.tsx | 3 +- packages/live2d/src/components/Live2dTips.tsx | 12 +- .../live2d/src/components/Live2dToggle.tsx | 3 +- .../live2d/src/components/Live2dWidget.tsx | 1 - packages/live2d/src/context/config-context.ts | 54 +++-- packages/live2d/src/events/event.d.ts | 49 +++- packages/live2d/src/events/index.ts | 2 +- packages/live2d/src/events/load-tips.ts | 46 ---- packages/live2d/src/events/tip-events.ts | 217 ++++++++++++++++++ packages/live2d/src/events/types.ts | 27 --- .../live2d/src/helpers/dateWithinRange.ts | 26 +++ packages/live2d/src/helpers/getPluginTips.ts | 9 +- .../live2d/src/helpers/loadTipsResource.ts | 1 + packages/live2d/src/helpers/mergeTips.ts | 2 +- .../live2d/src/helpers/pluginTipsCovert.ts | 29 --- packages/live2d/src/helpers/sendMessage.ts | 9 +- .../live2d/src/helpers/timeWithinRange.ts | 24 ++ packages/live2d/src/live2d/model.ts | 2 +- packages/live2d/src/util/distinctArray.ts | 7 - packages/live2d/src/utils/distinctArray.ts | 9 + packages/live2d/src/utils/isNotEmpty.ts | 5 + .../live2d/src/{util => utils}/isString.ts | 0 packages/live2d/src/utils/randomSelection.ts | 9 + .../{util/UnoMixin.ts => utils/unoMixin.ts} | 0 packages/live2d/src/utils/util.ts | 37 +++ .../resources/static/js/live2d-autoload.js | 22 +- 27 files changed, 442 insertions(+), 165 deletions(-) delete mode 100644 packages/live2d/src/events/load-tips.ts create mode 100644 packages/live2d/src/events/tip-events.ts delete mode 100644 packages/live2d/src/events/types.ts create mode 100644 packages/live2d/src/helpers/dateWithinRange.ts delete mode 100644 packages/live2d/src/helpers/pluginTipsCovert.ts create mode 100644 packages/live2d/src/helpers/timeWithinRange.ts delete mode 100644 packages/live2d/src/util/distinctArray.ts create mode 100644 packages/live2d/src/utils/distinctArray.ts create mode 100644 packages/live2d/src/utils/isNotEmpty.ts rename packages/live2d/src/{util => utils}/isString.ts (100%) create mode 100644 packages/live2d/src/utils/randomSelection.ts rename packages/live2d/src/{util/UnoMixin.ts => utils/unoMixin.ts} (100%) create mode 100644 packages/live2d/src/utils/util.ts diff --git a/packages/live2d/src/common/UnoLitElement.ts b/packages/live2d/src/common/UnoLitElement.ts index bf940fc..af5257c 100644 --- a/packages/live2d/src/common/UnoLitElement.ts +++ b/packages/live2d/src/common/UnoLitElement.ts @@ -1,4 +1,4 @@ import { LitElement } from "lit"; -import { UNO } from "../util/UnoMixin"; +import { UNO } from "../utils/unoMixin"; export const UnoLitElement = UNO(LitElement) \ No newline at end of file diff --git a/packages/live2d/src/components/Live2dCanvas.tsx b/packages/live2d/src/components/Live2dCanvas.tsx index fdd32fb..5d738a3 100644 --- a/packages/live2d/src/components/Live2dCanvas.tsx +++ b/packages/live2d/src/components/Live2dCanvas.tsx @@ -7,7 +7,6 @@ import Model from "../live2d/model"; import { consume } from "@lit/context"; import { configContext, type Live2dConfig } from "../context/config-context"; import "../libs/live2d.min.js"; -import { LIVE2D_BEFORE_INIT_EVENT } from "../events/types.js"; export class Live2dCanvas extends UnoLitElement { @consume({ context: configContext }) @@ -32,7 +31,7 @@ export class Live2dCanvas extends UnoLitElement { super.connectedCallback(); // 发出 Live2d beforeInit 事件 window.dispatchEvent( - new CustomEvent(LIVE2D_BEFORE_INIT_EVENT, { + new CustomEvent("live2d:before-init", { detail: { config: this.config, }, diff --git a/packages/live2d/src/components/Live2dTips.tsx b/packages/live2d/src/components/Live2dTips.tsx index 4e945db..af5bcf2 100644 --- a/packages/live2d/src/components/Live2dTips.tsx +++ b/packages/live2d/src/components/Live2dTips.tsx @@ -2,10 +2,6 @@ import { html, type TemplateResult } from "lit"; import { UnoLitElement } from "../common/UnoLitElement"; import { createComponent } from "@lit/react"; import React from "react"; -import { - LIVE2d_MESSAGE_EVENT, - type Live2dMessageEventDetail, -} from "../events/types"; import { consume } from "@lit/context"; import { configContext, type Live2dConfig } from "../context/config-context"; import { property } from "lit/decorators.js"; @@ -27,20 +23,20 @@ export class Live2dTips extends UnoLitElement { super.connectedCallback(); // 为 tips 注册 tips 相关事件 window.addEventListener( - LIVE2d_MESSAGE_EVENT, + "live2d:send-message", this.handleMessage as EventListener, ); } disconnectedCallback(): void { - super.connectedCallback(); + super.disconnectedCallback(); window.removeEventListener( - LIVE2d_MESSAGE_EVENT, + "live2d:send-message", this.handleMessage as EventListener, ); } - handleMessage(e: CustomEvent) { + handleMessage(e: CustomEvent): void { console.log(e.detail); return; } diff --git a/packages/live2d/src/components/Live2dToggle.tsx b/packages/live2d/src/components/Live2dToggle.tsx index 8a5f007..aa46cb5 100644 --- a/packages/live2d/src/components/Live2dToggle.tsx +++ b/packages/live2d/src/components/Live2dToggle.tsx @@ -2,7 +2,6 @@ import { html, type TemplateResult } from "lit"; import { UnoLitElement } from "../common/UnoLitElement"; import { createComponent } from "@lit/react"; import React from "react"; -import { type Live2dToggleEventDetail, TOGGLE_CANVAS_EVENT } from "../events/types"; import { state } from "lit/decorators.js"; export class Live2dToggle extends UnoLitElement { @@ -49,7 +48,7 @@ export class Live2dToggle extends UnoLitElement { localStorage.setItem("live2d-display", Date.now().toString()); } this.dispatchEvent( - new CustomEvent(TOGGLE_CANVAS_EVENT, { + new CustomEvent("live2d:toggle-canvas", { bubbles: true, composed: true, detail: { diff --git a/packages/live2d/src/components/Live2dWidget.tsx b/packages/live2d/src/components/Live2dWidget.tsx index c71c272..9b9abf9 100644 --- a/packages/live2d/src/components/Live2dWidget.tsx +++ b/packages/live2d/src/components/Live2dWidget.tsx @@ -7,7 +7,6 @@ import { state } from "lit/decorators.js"; import "./Live2dToggle"; import "./Live2dTips"; import "./Live2dCanvas"; -import type { Live2dToggleEventDetail } from "../events/types"; export class Live2dWidget extends UnoLitElement { @state() diff --git a/packages/live2d/src/context/config-context.ts b/packages/live2d/src/context/config-context.ts index 915e1c4..8720415 100644 --- a/packages/live2d/src/context/config-context.ts +++ b/packages/live2d/src/context/config-context.ts @@ -1,24 +1,40 @@ import { createContext } from '@lit/context'; +export interface ObjectAny extends Record { } + +export interface TipMouseover extends ObjectAny { + selector: string; + text: string[] | string; +} + +export interface TipClick extends ObjectAny { + selector: string; + text: string[] | string; +} + +export interface TipSeason extends ObjectAny { + date: string; + text: string[] | string; +} + +export interface TipTime extends ObjectAny { + hour: string; + text: string[] | string; +} + +export interface TipMessage extends ObjectAny { + default?: string[] | string; + console?: string[] | string; + copy?: string[] | string; + visibilitychange?: string[] | string; +} + export interface TipConfig { - mouseover: { - selector: string; - text: string[] | string; - }[]; - click: { - selector: string; - text: string[] | string; - }[]; - seasons: { - date: string; - text: string[] | string; - }[]; - message: { - default?: string[] | string; - console?: string[] | string; - copy?: string[] | string; - visibilitychange?: string[] | string; - } + mouseover: TipMouseover[]; + click: TipClick[]; + seasons: TipSeason[]; + time: TipTime[]; + message: TipMessage; } export interface Live2dConfig { @@ -54,6 +70,8 @@ export interface Live2dConfig { copyContentTip: string[] | string; // 控制台打印 tips openConsoleTip: string[] | string; + // 首次打开站点是否显示 tips + firstOpenSite?: boolean [key: string]: unknown; } diff --git a/packages/live2d/src/events/event.d.ts b/packages/live2d/src/events/event.d.ts index dbb1ea5..417d7ca 100644 --- a/packages/live2d/src/events/event.d.ts +++ b/packages/live2d/src/events/event.d.ts @@ -1,8 +1,55 @@ +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent) */ +interface CustomEvent extends Event { + /** + * Returns any custom data event was created with. Typically used for synthetic events. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent/detail) + */ + readonly detail: T; + /** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent/initCustomEvent) + */ + initCustomEvent(type: keyof GlobalEventHandlersEventMap, bubbles?: boolean, cancelable?: boolean, detail?: T): void; +} + + // 扩展全局事件映射 interface GlobalEventHandlersEventMap { + // Live2d beforeInit 事件 "live2d:before-init": CustomEvent; + // 切换 canvas 显示状态事件 "live2d:toggle-canvas": CustomEvent; + // 发送 Live2D 消息事件 "live2d:send-message": CustomEvent; -} \ No newline at end of file + + // 添加默认消息事件 + "live2d:add-default-message": CustomEvent; +} + +interface Live2dMessageEventDetail { + // 消息内容 + text: string[] | string; + // 消息显示时间 + timeout: number; + // 消息优先级 + priority: number; +} + +interface Live2dBeforeInitEventDetail { + // Live2D 配置 + config: Live2dConfig +} + +interface Live2dToggleEventDetail { + // 是否显示看板娘 + isShow: boolean; +} + +interface Live2dAddDefaultMessageEventDetail { + // 默认消息 + message: string[] | string; +} diff --git a/packages/live2d/src/events/index.ts b/packages/live2d/src/events/index.ts index 73f237c..aca30bc 100644 --- a/packages/live2d/src/events/index.ts +++ b/packages/live2d/src/events/index.ts @@ -1 +1 @@ -import "./load-tips"; \ No newline at end of file +import "./tip-events"; \ No newline at end of file diff --git a/packages/live2d/src/events/load-tips.ts b/packages/live2d/src/events/load-tips.ts deleted file mode 100644 index aed124a..0000000 --- a/packages/live2d/src/events/load-tips.ts +++ /dev/null @@ -1,46 +0,0 @@ -import type { Live2dConfig, TipConfig } from "../context/config-context"; -import { getPluginTips } from "../helpers/getPluginTips"; -import { loadTipsResource } from "../helpers/loadTipsResource"; -import { mergeTips } from "../helpers/mergeTips"; -import { isNotEmptyString } from "../util/isString"; - -window.addEventListener("live2d:before-init", async (e) => { - const config = e.detail.config; - const tips = await _loadTips(config); - console.log("tips", tips); -}) - -const _loadTips = async (config: Live2dConfig) => { - if (!config) { - return; - } - // 后台配置 tips,其中包含 mouseover 及 click 两种配置,以及单独配置的 message - const pluginTips = getPluginTips(config); - // 主题设置 tips,只会包含 mouseover 及 click 两种配置(会过滤掉其他配置) - const themeTipsResult = await loadTipsResource(config.themeTipsPath); - const themeTips: TipConfig = { - click: themeTipsResult?.click || [], - mouseover: themeTipsResult?.mouseover || [], - seasons: [], - message: {}, - }; - const fullOrDefaultTips = await _getFullOrDefaultTips(config); - // 合并三种 tips - return mergeTips({ - pluginTips, - themeTips, - fullOrDefaultTips, - }); -} - -export const _getFullOrDefaultTips = async (config: Live2dConfig): Promise => { - // 获取插件文件中的全量 tips 文件 - if (isNotEmptyString(config?.tipsPath)) { - const tipsResult = await loadTipsResource(config.tipsPath); - if (tipsResult) { - return tipsResult; - } - } - // 获取默认的 tips 文件 - return (await import("../libs/live2d-tips.json")).default; -} diff --git a/packages/live2d/src/events/tip-events.ts b/packages/live2d/src/events/tip-events.ts new file mode 100644 index 0000000..8f52fa6 --- /dev/null +++ b/packages/live2d/src/events/tip-events.ts @@ -0,0 +1,217 @@ +import type { Live2dConfig, TipClick, TipConfig, TipMessage, TipMouseover, TipSeason, TipTime } from "../context/config-context"; +import { dataWithinRange } from "../helpers/dateWithinRange"; +import { getPluginTips } from "../helpers/getPluginTips"; +import { loadTipsResource } from "../helpers/loadTipsResource"; +import { mergeTips } from "../helpers/mergeTips"; +import { sendMessage } from "../helpers/sendMessage"; +import { timeWithinRange } from "../helpers/timeWithinRange"; +import { isNotEmptyString, isString } from "../utils/isString"; +import { randomSelection } from "../utils/randomSelection"; +import { documentTitle, getReferrerDomain, hasWebsiteHome } from "../utils/util"; + +window.addEventListener("live2d:before-init", async (e) => { + const config = e.detail.config; + const tips = await _loadTips(config); + if (!tips) { + return; + } + _registerTipEventListener(config, tips); +}) + +const _getWelComeMessage = (times: TipTime[]) => { + if (hasWebsiteHome) { + for (const { hour, text } of times) { + if (timeWithinRange(hour)) { + return text; + } + } + } + + const message = `欢迎阅读「${documentTitle}」`; + const domain = getReferrerDomain(); + return domain ? `Hello!来自 ${domain} 的朋友
${message}` : message; +} + +const _welcomeEvent = (times: TipTime[]) => { + const message = _getWelComeMessage(times); + if (!message) { + return; + } + sendMessage(message, 7000, 4); +} + +const _holidayEvent = (seasons: TipSeason[]) => { + for (const { date, text } of seasons) { + if (dataWithinRange(date)) { + window.dispatchEvent( + new CustomEvent("live2d:add-default-message", { + detail: { + message: text, + } + }) + ); + } + } +} + +const _userLeaveEvent = (message: TipMessage) => { + const { visibilitychange } = message; + document.addEventListener("visibilitychange", () => { + if (!document.hidden) { + sendMessage(visibilitychange, 6000, 2); + } + }); +} + +const _userCopyEvent = (message: TipMessage) => { + const { copy } = message; + window.addEventListener("copy", () => { + sendMessage(copy, 6000, 2); + }); +} + +const _userOpenConsoleEvent = (message: TipMessage) => { + const { console } = message; + const devtools = () => { }; + devtools.toString = () => { + sendMessage(console, 6000, 2); + }; +} + +const _userClickEvent = (clicks: TipClick[]) => { + window.addEventListener("click", (event) => { + for (const { selector, text } of clicks) { + const { target } = event; + if (!target || !(target instanceof HTMLElement)) { + continue; + } + if (!target.matches(selector)) { + continue; + } + let message = randomSelection(text); + if (!message) { + continue; + } + message = message.replace("{text}", target.innerText); + sendMessage(message, 4000, 1); + return; + } + }); +} + +const _userMouseoverEvent = (mouseovers: TipMouseover[]) => { + window.addEventListener("mouseover", (event: MouseEvent) => { + for (const { selector, text } of mouseovers) { + const { target } = event; + if (!target || !(target instanceof HTMLElement)) { + continue; + } + if (!target.matches(selector)) { + continue; + } + let message = randomSelection(text); + if (!message) { + continue; + } + message = message.replace("{text}", target.innerText); + sendMessage(message, 4000, 1); + return; + } + }); +} + +/** + * 监听用户是否处于活动状态,如果用户长时间不活动,则向 Live2d 发送消息 + */ +const _userActionEvent = (message: TipMessage) => { + let userAction = false; + let userActionTimer: number | undefined; + const defaultMessage = message.default; + const idleMessage: string[] = isString(defaultMessage) ? [defaultMessage] : (defaultMessage || []); + + window.addEventListener("mousemove", () => { + userAction = true; + }); + window.addEventListener("keydown", () => { + userAction = true; + }); + window.addEventListener("live2d:add-default-message", (ev) => { + const message = ev.detail.message; + if (Array.isArray(message)) { + idleMessage.push(...message); + } else { + idleMessage.push(message); + } + }) + setInterval(() => { + if (userAction) { + userAction = false; + clearInterval(userActionTimer); + userActionTimer = undefined; + return; + } + if (userActionTimer) { + return; + } + userActionTimer = setInterval(() => { + sendMessage(message.default, 6000, 2); + }, 20000); + }, 1000); +} + +const _registerTipEventListener = (config: Live2dConfig, tips: TipConfig) => { + // 首次进入页面时 + if (config.firstOpenSite) { + _welcomeEvent(tips.time) + } + // 节日事件 + _holidayEvent(tips.seasons); + // 用户是否活动事件 + _userActionEvent(tips.message); + // 注册用户鼠标悬停事件 + _userMouseoverEvent(tips.mouseover); + // 注册用户点击事件 + _userClickEvent(tips.click); + // 用户打开控制台事件 + _userOpenConsoleEvent(tips.message); + // 用户复制内容事件 + _userCopyEvent(tips.message); + // 用户离开页面事件 + _userLeaveEvent(tips.message); +} + +const _loadTips = async (config: Live2dConfig) => { + if (!config) { + return; + } + // 后台配置 tips,其中包含 mouseover 及 click 两种配置,以及单独配置的 message + const pluginTips = getPluginTips(config); + // 主题设置 tips,只会包含 mouseover 及 click 两种配置(会过滤掉其他配置) + const themeTipsResult = await loadTipsResource(config.themeTipsPath); + const themeTips: TipConfig = { + click: themeTipsResult?.click || [], + mouseover: themeTipsResult?.mouseover || [], + seasons: [], + time: [], + message: {}, + }; + const fullOrDefaultTips = await _getFullOrDefaultTips(config); + // 合并三种 tips + return mergeTips({ + pluginTips, + themeTips, + fullOrDefaultTips, + }); +} + +export const _getFullOrDefaultTips = async (config: Live2dConfig): Promise => { + // 获取插件文件中的全量 tips 文件 + if (isNotEmptyString(config?.tipsPath)) { + const tipsResult = await loadTipsResource(config.tipsPath); + if (tipsResult) { + return tipsResult; + } + } + // 获取默认的 tips 文件 + return (await import("../libs/live2d-tips.json")).default; +} diff --git a/packages/live2d/src/events/types.ts b/packages/live2d/src/events/types.ts deleted file mode 100644 index 1658fd1..0000000 --- a/packages/live2d/src/events/types.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { Live2dConfig } from "../context/config-context"; - -// Live2d beforeInit 事件 -export const LIVE2D_BEFORE_INIT_EVENT = 'live2d:before-init'; -export type Live2dBeforeInitEventDetail = { - // Live2D 配置 - config: Live2dConfig -} - - -// 切换 canvas 显示状态事件 -export const TOGGLE_CANVAS_EVENT = 'live2d:toggle-canvas'; -export type Live2dToggleEventDetail = { - // 是否显示看板娘 - isShow: boolean; -} - -// 发送 Live2D 消息事件 -export const LIVE2d_MESSAGE_EVENT = 'live2d:send-message'; -export type Live2dMessageEventDetail = { - // 消息内容 - text: string; - // 消息显示时间 - timeout: number; - // 消息优先级 - priority: number; -} diff --git a/packages/live2d/src/helpers/dateWithinRange.ts b/packages/live2d/src/helpers/dateWithinRange.ts new file mode 100644 index 0000000..cd86302 --- /dev/null +++ b/packages/live2d/src/helpers/dateWithinRange.ts @@ -0,0 +1,26 @@ +const RANGE_SEPARATOR = '-'; +const DATE_SEPARATOR = '/'; + +/** + * 检查指定的日期是否在当前日期范围内。 + * + * @param date 指定的日期格式为 `MM/DD` 或 `MM/DD-MM/DD`。 + * @returns 如果日期在当前范围内则返回 true, 否则返回 false。 + */ +export const dataWithinRange = (date: string): boolean => { + const now = new Date(); + const currentMonth = now.getMonth() + 1; + const currentDate = now.getDate(); + + const [startDate, endDate = startDate] = date.split(RANGE_SEPARATOR); + + const [startMonth, startDay] = startDate.split(DATE_SEPARATOR).map(Number); + const [endMonth, endDay] = endDate.split(DATE_SEPARATOR).map(Number); + + return ( + startMonth <= currentMonth && + currentMonth <= endMonth && + startDay <= currentDate && + currentDate <= endDay + ); +} diff --git a/packages/live2d/src/helpers/getPluginTips.ts b/packages/live2d/src/helpers/getPluginTips.ts index 423e61b..ae7e8a8 100644 --- a/packages/live2d/src/helpers/getPluginTips.ts +++ b/packages/live2d/src/helpers/getPluginTips.ts @@ -1,4 +1,5 @@ import type { Live2dConfig, TipConfig } from "../context/config-context"; +import { isNotEmpty } from "../utils/isNotEmpty"; /** * 整合插件配置中的 tips 元素。 @@ -21,6 +22,7 @@ export const getPluginTips = (config: Live2dConfig): TipConfig => { seasons: [], click: [], mouseover: [], + time: [], message: {}, }; // selector @@ -42,11 +44,14 @@ export const getPluginTips = (config: Live2dConfig): TipConfig => { } } // message - if (tips.message) { + if (isNotEmpty(config.backSiteTip)) { tips.message.visibilitychange = config.backSiteTip; + } + if (isNotEmpty(config.copyContentTip)) { tips.message.copy = config.copyContentTip; + } + if (isNotEmpty(config.openConsoleTip)) { tips.message.console = config.openConsoleTip; } - return tips; } \ No newline at end of file diff --git a/packages/live2d/src/helpers/loadTipsResource.ts b/packages/live2d/src/helpers/loadTipsResource.ts index e0fa4af..893d151 100644 --- a/packages/live2d/src/helpers/loadTipsResource.ts +++ b/packages/live2d/src/helpers/loadTipsResource.ts @@ -12,6 +12,7 @@ export function loadTipsResource(url?: string) { click: [], seasons: [], message: {}, + time: [], }; return new Promise((resolve) => { diff --git a/packages/live2d/src/helpers/mergeTips.ts b/packages/live2d/src/helpers/mergeTips.ts index 3a4eb0e..f31507e 100644 --- a/packages/live2d/src/helpers/mergeTips.ts +++ b/packages/live2d/src/helpers/mergeTips.ts @@ -1,5 +1,5 @@ import type { TipConfig } from "../context/config-context"; -import { distinctArray } from "../util/distinctArray"; +import { distinctArray } from "../utils/distinctArray"; /** * 合并各个渠道的 tips,根据获取位置不同,合并时优先级也不同。优先级按高到低的顺序为 diff --git a/packages/live2d/src/helpers/pluginTipsCovert.ts b/packages/live2d/src/helpers/pluginTipsCovert.ts deleted file mode 100644 index ea50cfd..0000000 --- a/packages/live2d/src/helpers/pluginTipsCovert.ts +++ /dev/null @@ -1,29 +0,0 @@ -import type { Live2dConfig } from "../context/config-context"; - -export function backendConfigConvert(config: Live2dConfig) { - const tips = { - click: [], - mouseover: [], - message: {}, - }; - // selector - if (!!config["selectorTips"]) { - config["selectorTips"].forEach((item) => { - let texts = item["messageTexts"].map((text) => text.message); - let obj = { - selector: item["selector"], - text: texts, - }; - if (item["mouseAction"] === "click") { - tips.click.push(obj); - } else { - tips.mouseover.push(obj); - } - }); - } - // message - tips.message.visibilitychange = config["backSiteTip"]; - tips.message.copy = config["copyContentTip"]; - tips.message.console = config["openConsoleTip"]; - return tips; -}; \ No newline at end of file diff --git a/packages/live2d/src/helpers/sendMessage.ts b/packages/live2d/src/helpers/sendMessage.ts index 3ce33ec..af62b97 100644 --- a/packages/live2d/src/helpers/sendMessage.ts +++ b/packages/live2d/src/helpers/sendMessage.ts @@ -1,13 +1,14 @@ -import { LIVE2d_MESSAGE_EVENT } from "../events/types"; - /** * 向 Live2D 发送消息事件 * @param text * @param timeout * @param priority */ -export function sendMessage(text: string, timeout = 3000, priority = 0) { - const event = new CustomEvent(LIVE2d_MESSAGE_EVENT, { +export function sendMessage(text: string | string[] | undefined, timeout = 3000, priority = 0) { + if (!text) { + return; + } + const event = new CustomEvent("live2d", { detail: { text, timeout, diff --git a/packages/live2d/src/helpers/timeWithinRange.ts b/packages/live2d/src/helpers/timeWithinRange.ts new file mode 100644 index 0000000..d329dcc --- /dev/null +++ b/packages/live2d/src/helpers/timeWithinRange.ts @@ -0,0 +1,24 @@ +const SEPARATOR = "-"; + +/** + * 判断当前是否在指定时间范围内。 + * + * @param hour 指定的时间范围格式为 `HH-HH`。 + * @returns 如果当前时间在指定范围内则返回 true, 否则返回 false。 + */ +export const timeWithinRange = (hour: string): boolean => { + const spiltTime = hour.split(SEPARATOR); + const now = new Date(); + const after = Number.parseInt(spiltTime[0]); + const before = Number.parseInt(spiltTime[1]) || after; + + + if (after < 0 || before > 23 || after > before) { + throw new Error("时间范围不正确"); + } + + if (after <= now.getHours() && now.getHours() <= before) { + return true; + } + return false; +} \ No newline at end of file diff --git a/packages/live2d/src/live2d/model.ts b/packages/live2d/src/live2d/model.ts index 8afbed0..d19ea4f 100644 --- a/packages/live2d/src/live2d/model.ts +++ b/packages/live2d/src/live2d/model.ts @@ -1,6 +1,6 @@ import type { Live2dConfig } from "../context/config-context"; import { sendMessage } from "../helpers/sendMessage"; -import { isNotEmptyString } from "../util/isString"; +import { isNotEmptyString } from "../utils/isString"; declare const loadlive2d: any; diff --git a/packages/live2d/src/util/distinctArray.ts b/packages/live2d/src/util/distinctArray.ts deleted file mode 100644 index 4286249..0000000 --- a/packages/live2d/src/util/distinctArray.ts +++ /dev/null @@ -1,7 +0,0 @@ -export const distinctArray = (arr: T[], key: string) => { - const map = new Map(); - for (const item of arr) { - map.set(item[key], item); - } - return [...map.values()]; -} \ No newline at end of file diff --git a/packages/live2d/src/utils/distinctArray.ts b/packages/live2d/src/utils/distinctArray.ts new file mode 100644 index 0000000..4edeb81 --- /dev/null +++ b/packages/live2d/src/utils/distinctArray.ts @@ -0,0 +1,9 @@ +import type { ObjectAny } from "../context/config-context"; + +export const distinctArray = (arr: T[], key: keyof T) => { + const map = new Map(); + for (const item of arr) { + map.set(item[key], item); + } + return [...map.values()]; +} \ No newline at end of file diff --git a/packages/live2d/src/utils/isNotEmpty.ts b/packages/live2d/src/utils/isNotEmpty.ts new file mode 100644 index 0000000..85d492f --- /dev/null +++ b/packages/live2d/src/utils/isNotEmpty.ts @@ -0,0 +1,5 @@ +export const isNotEmpty = (value: T[] | T | null | undefined): value is T[] | T => { + return value !== null && value !== undefined && (Array.isArray(value) ? value.length > 0 : + typeof value === 'string' ? value.trim() !== '' : true + ); +} \ No newline at end of file diff --git a/packages/live2d/src/util/isString.ts b/packages/live2d/src/utils/isString.ts similarity index 100% rename from packages/live2d/src/util/isString.ts rename to packages/live2d/src/utils/isString.ts diff --git a/packages/live2d/src/utils/randomSelection.ts b/packages/live2d/src/utils/randomSelection.ts new file mode 100644 index 0000000..80d678b --- /dev/null +++ b/packages/live2d/src/utils/randomSelection.ts @@ -0,0 +1,9 @@ +export const randomSelection = (obj: T | T[]): T | undefined => { + if (Array.isArray(obj)) { + if (obj.length === 0) { + return undefined; + } + return obj[Math.floor(Math.random() * obj.length)]; + } + return obj; +}; \ No newline at end of file diff --git a/packages/live2d/src/util/UnoMixin.ts b/packages/live2d/src/utils/unoMixin.ts similarity index 100% rename from packages/live2d/src/util/UnoMixin.ts rename to packages/live2d/src/utils/unoMixin.ts diff --git a/packages/live2d/src/utils/util.ts b/packages/live2d/src/utils/util.ts new file mode 100644 index 0000000..9fa44eb --- /dev/null +++ b/packages/live2d/src/utils/util.ts @@ -0,0 +1,37 @@ +export const hasWebsiteHome = location.hostname === "/"; + +export const documentTitle = document.title.split(" - ")[0]; + +export const isReferrer = document.referrer === ""; + +export const getReferrer = () => { + if (isReferrer) { + return; + } + return new URL(document.referrer); +} + +export const getReferrerDomain = () => { + const Domains: Record = { + baidu: "百度", + so: "360搜索", + google: "谷歌搜索", + bing: "必应", + yahoo: "雅虎", + sogou: "搜狗", + haosou: "好搜", + } + const referrer = getReferrer(); + if (!referrer) { + return; + } + const { hostname } = referrer; + if (location.hostname === hostname) { + return; + } + const domain = hostname.split(".")[1]; + if (Domains[domain]) { + return Domains[domain]; + } + return hostname; +} \ No newline at end of file diff --git a/src/main/resources/static/js/live2d-autoload.js b/src/main/resources/static/js/live2d-autoload.js index 20ad5aa..bc62ce8 100644 --- a/src/main/resources/static/js/live2d-autoload.js +++ b/src/main/resources/static/js/live2d-autoload.js @@ -210,7 +210,7 @@ function Live2d() { modelId = this.#config["modelId"] || 1; // 模型 ID modelTexturesId = this.#config["modelTexturesId"] || 53; // 材质 ID } - + if (this.#config["consoleShowStatu"]) { eval( (function (p, a, c, k, e, r) { @@ -568,19 +568,13 @@ function Live2d() { * @param time 时间 * @returns {string|*} */ - message.welcomeMessage = function (time) { - // referrer 内获取的网页 - const domains = { - baidu: "百度", - so: "360搜索", - google: "谷歌搜索", - }; + message.welcomeMessage = (time) => { // 如果是主页 if (location.pathname === "/") { - for (let { hour, text } of time) { - const now = new Date(), - after = hour.split("-")[0], - before = hour.split("-")[1] || after; + for (const { hour, text } of time) { + const now = new Date(); + const after = hour.split("-")[0]; + const before = hour.split("-")[1] || after; if (after <= now.getHours() && now.getHours() <= before) { return text; } @@ -589,8 +583,8 @@ function Live2d() { const text = `欢迎阅读「${document.title.split(" - ")[0]}」`; let from; if (document.referrer !== "") { - const referrer = new URL(document.referrer), - domain = referrer.hostname.split(".")[1]; + const referrer = new URL(document.referrer); + const domain = referrer.hostname.split(".")[1]; if (location.hostname === referrer.hostname) return text; if (domain in domains) { from = domains[domain]; From fb3b429491225b38d5fcd4079589414ff8cd938b Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Sun, 16 Feb 2025 18:37:36 +0800 Subject: [PATCH 07/12] feat: complete tips functionality --- package.json | 4 -- packages/live2d/src/components/Live2dTips.tsx | 64 +++++++++++++++---- .../live2d/src/components/Live2dWidget.tsx | 8 ++- packages/live2d/src/events/tip-events.ts | 18 +++--- packages/live2d/src/helpers/sendMessage.ts | 2 +- packages/live2d/uno.config.ts | 27 +++++++- 6 files changed, 92 insertions(+), 31 deletions(-) diff --git a/package.json b/package.json index 1065b22..7344e8b 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,6 @@ { "name": "plugin-live2d", "private": true, - "scripts": { - "build": "pnpm run build:packages", - "example:dev": "pnpm dev --filter ./packages/** " - }, "author": { "name": "LIlGG", "url": "https://github.com/LIlGG" diff --git a/packages/live2d/src/components/Live2dTips.tsx b/packages/live2d/src/components/Live2dTips.tsx index af5bcf2..0fecdfe 100644 --- a/packages/live2d/src/components/Live2dTips.tsx +++ b/packages/live2d/src/components/Live2dTips.tsx @@ -4,41 +4,77 @@ import { createComponent } from "@lit/react"; import React from "react"; import { consume } from "@lit/context"; import { configContext, type Live2dConfig } from "../context/config-context"; -import { property } from "lit/decorators.js"; +import { property, state } from "lit/decorators.js"; +import { isNotEmpty } from "../utils/isNotEmpty"; +import { randomSelection } from "../utils/randomSelection"; +import { unsafeHTML } from "lit/directives/unsafe-html.js"; +import { classMap } from "lit/directives/class-map.js"; export class Live2dTips extends UnoLitElement { @consume({ context: configContext }) @property({ attribute: false }) public config?: Live2dConfig; + @state() + private _isShow = false; + @state() + private _message = ""; + private priority = -1; + private messageTimer: number | null = null; + + constructor() { + super(); + this._isShow = false; + this._message = ""; + } + render(): TemplateResult { + const classes = { + "opacity-100": this._isShow, + "opacity-0": !this._isShow, + }; return html` -
- +
+ ${unsafeHTML(this._message)}
`; } - + connectedCallback(): void { super.connectedCallback(); // 为 tips 注册 tips 相关事件 - window.addEventListener( - "live2d:send-message", - this.handleMessage as EventListener, - ); + window.addEventListener("live2d:send-message", this.handleMessage.bind(this)); } disconnectedCallback(): void { super.disconnectedCallback(); - window.removeEventListener( - "live2d:send-message", - this.handleMessage as EventListener, - ); + window.removeEventListener("live2d:send-message", this.handleMessage.bind(this)); } handleMessage(e: CustomEvent): void { - console.log(e.detail); - return; + const { text, timeout, priority } = e.detail; + if (!isNotEmpty(text)) { + return; + } + if (priority < this.priority) { + return; + } + if (this.messageTimer) { + clearTimeout(this.messageTimer); + this.messageTimer = null; + } + const message = randomSelection(text); + if (!isNotEmpty(message)) { + return; + } + this.priority = priority; + this._message = message; + this._isShow = true; + this.messageTimer = setTimeout(() => { + this._isShow = false; + this.priority = -1; + }, timeout); } } diff --git a/packages/live2d/src/components/Live2dWidget.tsx b/packages/live2d/src/components/Live2dWidget.tsx index 9b9abf9..b06bdd1 100644 --- a/packages/live2d/src/components/Live2dWidget.tsx +++ b/packages/live2d/src/components/Live2dWidget.tsx @@ -21,9 +21,11 @@ export class Live2dWidget extends UnoLitElement { renderLive2dWidget() { if (this._isShow) { - return html`
- - + return html`
+
+ + +
`; } } diff --git a/packages/live2d/src/events/tip-events.ts b/packages/live2d/src/events/tip-events.ts index 8f52fa6..8b26ddb 100644 --- a/packages/live2d/src/events/tip-events.ts +++ b/packages/live2d/src/events/tip-events.ts @@ -80,11 +80,12 @@ const _userOpenConsoleEvent = (message: TipMessage) => { const _userClickEvent = (clicks: TipClick[]) => { window.addEventListener("click", (event) => { + const path = event.composedPath(); + const target = path[0]; + if (!(target instanceof HTMLElement)) { + return; + } for (const { selector, text } of clicks) { - const { target } = event; - if (!target || !(target instanceof HTMLElement)) { - continue; - } if (!target.matches(selector)) { continue; } @@ -101,11 +102,12 @@ const _userClickEvent = (clicks: TipClick[]) => { const _userMouseoverEvent = (mouseovers: TipMouseover[]) => { window.addEventListener("mouseover", (event: MouseEvent) => { + const path = event.composedPath(); + const target = path[0]; + if (!(target instanceof HTMLElement)) { + return; + } for (const { selector, text } of mouseovers) { - const { target } = event; - if (!target || !(target instanceof HTMLElement)) { - continue; - } if (!target.matches(selector)) { continue; } diff --git a/packages/live2d/src/helpers/sendMessage.ts b/packages/live2d/src/helpers/sendMessage.ts index af62b97..72c2412 100644 --- a/packages/live2d/src/helpers/sendMessage.ts +++ b/packages/live2d/src/helpers/sendMessage.ts @@ -8,7 +8,7 @@ export function sendMessage(text: string | string[] | undefined, timeout = 3000, if (!text) { return; } - const event = new CustomEvent("live2d", { + const event = new CustomEvent("live2d:send-message", { detail: { text, timeout, diff --git a/packages/live2d/uno.config.ts b/packages/live2d/uno.config.ts index 0127cd9..89d51ec 100644 --- a/packages/live2d/uno.config.ts +++ b/packages/live2d/uno.config.ts @@ -10,5 +10,30 @@ export default defineConfig({ ['writing-vertical-rl', { "writing-mode": "vertical-rl" }] - ] + ], + theme: { + backgroundColor: { + tips: 'rgba(236, 217, 188, .5)', + }, + borderColor: { + tips: 'rgba(224, 186, 140, .62)', + }, + boxShadow: { + tips: '0 3px 15px 2px rgba(191, 158, 118, .2)' + }, + animation: { + keyframes: { + shake: '{2%{transform:translate(.5px,-1.5px) rotate(-.5deg);}4%{transform:translate(.5px,1.5px) rotate(1.5deg);}6%{transform:translate(1.5px,1.5px) rotate(1.5deg);}8%{transform:translate(2.5px,1.5px) rotate(.5deg);}10%{transform:translate(.5px,2.5px) rotate(.5deg);}12%{transform:translate(1.5px,1.5px) rotate(.5deg);}14%{transform:translate(.5px,.5px) rotate(.5deg);}16%{transform:translate(-1.5px,-.5px) rotate(1.5deg);}18%{transform:translate(.5px,.5px) rotate(1.5deg);}20%{transform:translate(2.5px,2.5px) rotate(1.5deg);}22%{transform:translate(.5px,-1.5px) rotate(1.5deg);}24%{transform:translate(-1.5px,1.5px) rotate(-.5deg);}26%{transform:translate(1.5px,.5px) rotate(1.5deg);}28%{transform:translate(-.5px,-.5px) rotate(-.5deg);}30%{transform:translate(1.5px,-.5px) rotate(-.5deg);}32%{transform:translate(2.5px,-1.5px) rotate(1.5deg);}34%{transform:translate(2.5px,2.5px) rotate(-.5deg);}36%{transform:translate(.5px,-1.5px) rotate(.5deg);}38%{transform:translate(2.5px,-.5px) rotate(-.5deg);}40%{transform:translate(-.5px,2.5px) rotate(.5deg);}42%{transform:translate(-1.5px,2.5px) rotate(.5deg);}44%{transform:translate(-1.5px,1.5px) rotate(.5deg);}46%{transform:translate(1.5px,-.5px) rotate(-.5deg);}48%{transform:translate(2.5px,-.5px) rotate(.5deg);}50%{transform:translate(-1.5px,1.5px) rotate(.5deg);}52%{transform:translate(-.5px,1.5px) rotate(.5deg);}54%{transform:translate(-1.5px,1.5px) rotate(.5deg);}56%{transform:translate(.5px,2.5px) rotate(1.5deg);}58%{transform:translate(2.5px,2.5px) rotate(.5deg);}60%{transform:translate(2.5px,-1.5px) rotate(1.5deg);}62%{transform:translate(-1.5px,.5px) rotate(1.5deg);}64%{transform:translate(-1.5px,1.5px) rotate(1.5deg);}66%{transform:translate(.5px,2.5px) rotate(1.5deg);}68%{transform:translate(2.5px,-1.5px) rotate(1.5deg);}70%{transform:translate(2.5px,2.5px) rotate(.5deg);}72%{transform:translate(-.5px,-1.5px) rotate(1.5deg);}74%{transform:translate(-1.5px,2.5px) rotate(1.5deg);}76%{transform:translate(-1.5px,2.5px) rotate(1.5deg);}78%{transform:translate(-1.5px,2.5px) rotate(.5deg);}80%{transform:translate(-1.5px,.5px) rotate(-.5deg);}82%{transform:translate(-1.5px,.5px) rotate(-.5deg);}84%{transform:translate(-.5px,.5px) rotate(1.5deg);}86%{transform:translate(2.5px,1.5px) rotate(.5deg);}88%{transform:translate(-1.5px,.5px) rotate(1.5deg);}90%{transform:translate(-1.5px,-.5px) rotate(-.5deg);}92%{transform:translate(-1.5px,-1.5px) rotate(1.5deg);}94%{transform:translate(.5px,.5px) rotate(-.5deg);}96%{transform:translate(2.5px,-.5px) rotate(-.5deg);}98%{transform:translate(-1.5px,-1.5px) rotate(-.5deg);}0%,100%{transform:translate(0,0) rotate(0);}}' + }, + durations: { + shake: "50s" + }, + timingFns: { + shake: 'ease-in-out', + }, + counts: { + shake: 'infinite', + }, + } + } }); \ No newline at end of file From 6a472419506085e1c0d590a464c3565a90477446 Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Wed, 19 Feb 2025 01:19:09 +0800 Subject: [PATCH 08/12] refactor: preliminary completion of all tools refactoring --- packages/live2d/package.json | 1 + .../live2d/src/components/Live2dContext.tsx | 2 +- .../live2d/src/components/Live2dTools.tsx | 21 +- .../live2d/src/components/Live2dWidget.tsx | 19 +- packages/live2d/src/context/config-context.ts | 31 +- packages/live2d/src/libs/asteroids.min.js | 640 ++++++++++++++++++ packages/live2d/src/live2d/tools/ai-chat.ts | 20 + packages/live2d/src/live2d/tools/asteroids.ts | 29 + .../live2d/src/live2d/tools/custom-tool.ts | 39 ++ packages/live2d/src/live2d/tools/hitokoto.ts | 73 ++ packages/live2d/src/live2d/tools/info.ts | 21 + .../live2d/src/live2d/tools/screenshot.ts | 29 + .../live2d/src/live2d/tools/switch-model.ts | 20 + .../live2d/src/live2d/tools/switch-texture.ts | 20 + packages/live2d/src/live2d/tools/tools.ts | 19 + packages/live2d/tsconfig.json | 57 +- 16 files changed, 1001 insertions(+), 40 deletions(-) create mode 100644 packages/live2d/src/libs/asteroids.min.js create mode 100644 packages/live2d/src/live2d/tools/ai-chat.ts create mode 100644 packages/live2d/src/live2d/tools/asteroids.ts create mode 100644 packages/live2d/src/live2d/tools/custom-tool.ts create mode 100644 packages/live2d/src/live2d/tools/hitokoto.ts create mode 100644 packages/live2d/src/live2d/tools/info.ts create mode 100644 packages/live2d/src/live2d/tools/screenshot.ts create mode 100644 packages/live2d/src/live2d/tools/switch-model.ts create mode 100644 packages/live2d/src/live2d/tools/switch-texture.ts create mode 100644 packages/live2d/src/live2d/tools/tools.ts diff --git a/packages/live2d/package.json b/packages/live2d/package.json index b3af2c0..1ea064e 100644 --- a/packages/live2d/package.json +++ b/packages/live2d/package.json @@ -23,6 +23,7 @@ "@lit/context": "^1.1.3", "@lit/react": "^1.0.7", "lit": "^3.2.1", + "query-string": "^9.1.1", "react": "^19.0.0", "react-dom": "^19.0.0" }, diff --git a/packages/live2d/src/components/Live2dContext.tsx b/packages/live2d/src/components/Live2dContext.tsx index 651e769..bb45232 100644 --- a/packages/live2d/src/components/Live2dContext.tsx +++ b/packages/live2d/src/components/Live2dContext.tsx @@ -9,7 +9,7 @@ import "../events"; export class Live2dContext extends UnoLitElement { @provide({ context: configContext }) - logger = { + config = { apiPath: "https://live2d.fghrsh.net/api", live2dLocation: "right", consoleShowStatus: false, diff --git a/packages/live2d/src/components/Live2dTools.tsx b/packages/live2d/src/components/Live2dTools.tsx index 7731bb9..65821ef 100644 --- a/packages/live2d/src/components/Live2dTools.tsx +++ b/packages/live2d/src/components/Live2dTools.tsx @@ -2,21 +2,28 @@ import { html, type TemplateResult } from "lit"; import { UnoLitElement } from "../common/UnoLitElement"; import { createComponent } from "@lit/react"; import React from "react"; +import { consume } from "@lit/context"; +import { configContext, type Live2dConfig } from "../context/config-context"; +import { property } from "lit/decorators.js"; export class Live2dTools extends UnoLitElement { - render(): TemplateResult { - return html` + @consume({ context: configContext }) + @property({ attribute: false }) + public config?: Live2dConfig; + + render(): TemplateResult { + return html`
`; - } + } } customElements.define("live2d-tools", Live2dTools); export const Live2dToolsComponent = createComponent({ - tagName: "live2d-tools", - elementClass: Live2dTools, - react: React, -}) \ No newline at end of file + tagName: "live2d-tools", + elementClass: Live2dTools, + react: React, +}); diff --git a/packages/live2d/src/components/Live2dWidget.tsx b/packages/live2d/src/components/Live2dWidget.tsx index b06bdd1..289a3c4 100644 --- a/packages/live2d/src/components/Live2dWidget.tsx +++ b/packages/live2d/src/components/Live2dWidget.tsx @@ -2,13 +2,19 @@ import { html, type TemplateResult } from "lit"; import { UnoLitElement } from "../common/UnoLitElement"; import { createComponent } from "@lit/react"; import React from "react"; -import { state } from "lit/decorators.js"; - +import { property, state } from "lit/decorators.js"; +import { consume } from "@lit/context"; +import { configContext, type Live2dConfig } from "../context/config-context"; import "./Live2dToggle"; import "./Live2dTips"; import "./Live2dCanvas"; +import "./Live2dTools"; export class Live2dWidget extends UnoLitElement { + @consume({ context: configContext }) + @property({ attribute: false }) + public config?: Live2dConfig; + @state() private _isShow = false; @@ -19,12 +25,19 @@ export class Live2dWidget extends UnoLitElement { `; } + renderLive2dTools() { + if (this.config?.isTools) { + return html``; + } + } + renderLive2dWidget() { if (this._isShow) { return html`
-
+
+ ${this.renderLive2dTools()}
`; } diff --git a/packages/live2d/src/context/config-context.ts b/packages/live2d/src/context/config-context.ts index 8720415..f75eb62 100644 --- a/packages/live2d/src/context/config-context.ts +++ b/packages/live2d/src/context/config-context.ts @@ -37,15 +37,40 @@ export interface TipConfig { message: TipMessage; } -export interface Live2dConfig { +export interface Live2dToolsConfig { + // 是否显示右侧工具栏 + isTools?: boolean; + // openai 图标 + openaiIcon?: string; + // 一言图标 + hitokotoIcon?: string; + // 一言API + hitokotoApi?: string; + // 小宇宙游戏图标 + asteroidsIcon?: string; + // 切换模型图标 + switchModelIcon?: string; + // 切换纹理图标 + switchTextureIcon?: string; + // 截图生成的图片名称 + screenshotName?: string; + // 截图图标 + screenshotIcon?: string; + // 信息图标 + infoIcon?: string; + // 信息站点地址 + infoSite?: string; + // 退出 Live2d 图标 + exitIcon?: string; +} + +export interface Live2dConfig extends Live2dToolsConfig { // Live2d API 路径 apiPath: string; // Live2d 定位 live2dLocation: "left" | "right"; // 是否在控制台显示状态 consoleShowStatus?: boolean; - // 是否显示右侧工具栏 - isTools?: boolean; // 是否强制使用默认配置 isForceUseDefaultConfig?: boolean; // 模型编号 diff --git a/packages/live2d/src/libs/asteroids.min.js b/packages/live2d/src/libs/asteroids.min.js new file mode 100644 index 0000000..78fc3ca --- /dev/null +++ b/packages/live2d/src/libs/asteroids.min.js @@ -0,0 +1,640 @@ +// http://www.websiteasteroids.com +function Asteroids() { + if (!window.ASTEROIDS) window.ASTEROIDS = { + enemiesKilled: 0 + }; + class Vector { + constructor(x, y) { + if (typeof x === "Object") { + this.x = x.x; + this.y = x.y; + } else { + this.x = x; + this.y = y; + } + } + cp() { + return new Vector(this.x, this.y); + } + mul(factor) { + this.x *= factor; + this.y *= factor; + return this; + } + mulNew(factor) { + return new Vector(this.x * factor, this.y * factor); + } + add(vec) { + this.x += vec.x; + this.y += vec.y; + return this; + } + addNew(vec) { + return new Vector(this.x + vec.x, this.y + vec.y); + } + sub(vec) { + this.x -= vec.x; + this.y -= vec.y; + return this; + } + subNew(vec) { + return new Vector(this.x - vec.x, this.y - vec.y); + } + rotate(angle) { + const x = this.x, y = this.y; + this.x = x * Math.cos(angle) - Math.sin(angle) * y; + this.y = x * Math.sin(angle) + Math.cos(angle) * y; + return this; + } + rotateNew(angle) { + return this.cp().rotate(angle); + } + setAngle(angle) { + const l = this.len(); + this.x = Math.cos(angle) * l; + this.y = Math.sin(angle) * l; + return this; + } + setAngleNew(angle) { + return this.cp().setAngle(angle); + } + setLength(length) { + const l = this.len(); + if (l) this.mul(length / l); + else this.x = this.y = length; + return this; + } + setLengthNew(length) { + return this.cp().setLength(length); + } + normalize() { + const l = this.len(); + this.x /= l; + this.y /= l; + return this; + } + normalizeNew() { + return this.cp().normalize(); + } + angle() { + return Math.atan2(this.y, this.x); + } + collidesWith(rect) { + return this.x > rect.x && this.y > rect.y && this.x < rect.x + rect.width && this.y < rect.y + rect.height; + } + len() { + const l = Math.sqrt(this.x * this.x + this.y * this.y); + if (l < 0.005 && l > -0.005) return 0; + return l; + } + is(test) { + return typeof test === "object" && this.x === test.x && this.y === test.y; + } + toString() { + return "[Vector(" + this.x + ", " + this.y + ") angle: " + this.angle() + ", length: " + this.len() + "]"; + } + } + + class Line { + constructor(p1, p2) { + this.p1 = p1; + this.p2 = p2; + } + shift(pos) { + this.p1.add(pos); + this.p2.add(pos); + } + intersectsWithRect(rect) { + const LL = new Vector(rect.x, rect.y + rect.height); + const UL = new Vector(rect.x, rect.y); + const LR = new Vector(rect.x + rect.width, rect.y + rect.height); + const UR = new Vector(rect.x + rect.width, rect.y); + if (this.p1.x > LL.x && this.p1.x < UR.x && this.p1.y < LL.y && this.p1.y > UR.y && this.p2.x > LL.x && this.p2.x < UR.x && this.p2.y < LL.y && this.p2.y > UR.y) return true; + if (this.intersectsLine(new Line(UL, LL))) return true; + if (this.intersectsLine(new Line(LL, LR))) return true; + if (this.intersectsLine(new Line(UL, UR))) return true; + if (this.intersectsLine(new Line(UR, LR))) return true; + return false; + } + intersectsLine(line2) { + const v1 = this.p1, v2 = this.p2; + const v3 = line2.p1, v4 = line2.p2; + const denom = ((v4.y - v3.y) * (v2.x - v1.x)) - ((v4.x - v3.x) * (v2.y - v1.y)); + const numerator = ((v4.x - v3.x) * (v1.y - v3.y)) - ((v4.y - v3.y) * (v1.x - v3.x)); + const numerator2 = ((v2.x - v1.x) * (v1.y - v3.y)) - ((v2.y - v1.y) * (v1.x - v3.x)); + if (denom === 0.0) { + return false; + } + const ua = numerator / denom; + const ub = numerator2 / denom; + return (ua >= 0.0 && ua <= 1.0 && ub >= 0.0 && ub <= 1.0); + } + } + const that = this; + const isIE = !! window.ActiveXObject; + let w = document.documentElement.clientWidth, h = document.documentElement.clientHeight; + const playerWidth = 20, playerHeight = 30; + const playerVerts = [ + [-1 * playerHeight / 2, -1 * playerWidth / 2], + [-1 * playerHeight / 2, playerWidth / 2], + [playerHeight / 2, 0] + ]; + const ignoredTypes = ["HTML", "HEAD", "BODY", "SCRIPT", "TITLE", "META", "STYLE", "LINK", "SHAPE", "LINE", "GROUP", "IMAGE", "STROKE", "FILL", "SKEW", "PATH", "TEXTPATH"]; + const hiddenTypes = ["BR", "HR"]; + const FPS = 50; + const acc = 300; + const maxSpeed = 600; + const rotSpeed = 360; + const bulletSpeed = 700; + const particleSpeed = 400; + const timeBetweenFire = 150; + const timeBetweenBlink = 250; + const bulletRadius = 2; + const maxParticles = isIE ? 20 : 40; + const maxBullets = isIE ? 10 : 20; + this.flame = { + r: [], + y: [] + }; + this.toggleBlinkStyle = function() { + if (this.updated.blink.isActive) { + document.body.classList.remove("ASTEROIDSBLINK"); + } else { + document.body.classList.add("ASTEROIDSBLINK"); + } + this.updated.blink.isActive = !this.updated.blink.isActive; + }; + addStylesheet(".ASTEROIDSBLINK .ASTEROIDSYEAHENEMY", "outline: 2px dotted red;"); + this.pos = new Vector(100, 100); + this.lastPos = false; + this.vel = new Vector(0, 0); + this.dir = new Vector(0, 1); + this.keysPressed = {}; + this.firedAt = false; + this.updated = { + enemies: false, + flame: new Date().getTime(), + blink: { + time: 0, + isActive: false + } + }; + this.scrollPos = new Vector(0, 0); + this.bullets = []; + this.enemies = []; + this.dying = []; + this.totalEnemies = 0; + this.particles = []; + + function updateEnemyIndex() { + for (let enemy of that.enemies) { + enemy.classList.remove("ASTEROIDSYEAHENEMY"); + } + const all = document.body.getElementsByTagName("*"); + that.enemies = []; + for (let i = 0, el; el = all[i]; i++) { + if (!(ignoredTypes.includes(el.tagName.toUpperCase())) && el.prefix !== "g_vml_" && hasOnlyTextualChildren(el) && el.className !== "ASTEROIDSYEAH" && el.offsetHeight > 0) { + el.aSize = size(el); + that.enemies.push(el); + el.classList.add("ASTEROIDSYEAHENEMY"); + if (!el.aAdded) { + el.aAdded = true; + that.totalEnemies++; + } + } + } + }; + updateEnemyIndex(); + let createFlames; + (function() { + const rWidth = playerWidth, rIncrease = playerWidth * 0.1, yWidth = playerWidth * 0.6, yIncrease = yWidth * 0.2, halfR = rWidth / 2, halfY = yWidth / 2, halfPlayerHeight = playerHeight / 2; + createFlames = function() { + that.flame.r = [ + [-1 * halfPlayerHeight, -1 * halfR] + ]; + that.flame.y = [ + [-1 * halfPlayerHeight, -1 * halfY] + ]; + for (let x = 0; x < rWidth; x += rIncrease) { + that.flame.r.push([-random(2, 7) - halfPlayerHeight, x - halfR]); + } + that.flame.r.push([-1 * halfPlayerHeight, halfR]); + for (let x = 0; x < yWidth; x += yIncrease) { + that.flame.y.push([-random(2, 7) - halfPlayerHeight, x - halfY]); + } + that.flame.y.push([-1 * halfPlayerHeight, halfY]); + }; + })(); + createFlames(); + + function radians(deg) { + return deg * Math.PI / 180; + }; + + function random(from, to) { + return Math.floor(Math.random() * (to + 1) + from); + }; + + function boundsCheck(vec) { + if (vec.x > w) vec.x = 0; + else if (vec.x < 0) vec.x = w; + if (vec.y > h) vec.y = 0; + else if (vec.y < 0) vec.y = h; + }; + + function size(element) { + let el = element, left = 0, top = 0; + do { + left += el.offsetLeft || 0; + top += el.offsetTop || 0; + el = el.offsetParent; + } while (el); + return { + x: left, + y: top, + width: element.offsetWidth || 10, + height: element.offsetHeight || 10 + }; + }; + + function applyVisibility(vis) { + for (let p of window.ASTEROIDSPLAYERS) { + p.gameContainer.style.visibility = vis; + } + } + + function getElementFromPoint(x, y) { + applyVisibility("hidden"); + let element = document.elementFromPoint(x, y); + if (!element) { + applyVisibility("visible"); + return false; + } + if (element.nodeType === 3) element = element.parentNode; + applyVisibility("visible"); + return element; + }; + + function addParticles(startPos) { + const time = new Date().getTime(); + const amount = maxParticles; + for (let i = 0; i < amount; i++) { + that.particles.push({ + dir: (new Vector(Math.random() * 20 - 10, Math.random() * 20 - 10)).normalize(), + pos: startPos.cp(), + cameAlive: time + }); + } + }; + + function setScore() { + that.points.innerHTML = window.ASTEROIDS.enemiesKilled * 10; + }; + + function hasOnlyTextualChildren(element) { + if (element.offsetLeft < -100 && element.offsetWidth > 0 && element.offsetHeight > 0) return false; + if (hiddenTypes.includes(element.tagName)) return true; + if (element.offsetWidth === 0 && element.offsetHeight === 0) return false; + for (let i = 0; i < element.childNodes.length; i++) { + if (!(hiddenTypes.includes(element.childNodes[i].tagName)) && element.childNodes[i].childNodes.length !== 0) return false; + } + return true; + }; + + function addStylesheet(selector, rules) { + const stylesheet = document.createElement("style"); + stylesheet.rel = "stylesheet"; + stylesheet.id = "ASTEROIDSYEAHSTYLES"; + try { + stylesheet.innerHTML = selector + "{" + rules + "}"; + } catch (e) { + stylesheet.styleSheet.addRule(selector, rules); + } + document.getElementsByTagName("head")[0].appendChild(stylesheet); + }; + + function removeStylesheet(name) { + const stylesheet = document.getElementById(name); + if (stylesheet) { + stylesheet.parentNode.removeChild(stylesheet); + } + }; + this.gameContainer = document.createElement("div"); + this.gameContainer.className = "ASTEROIDSYEAH"; + document.body.appendChild(this.gameContainer); + this.canvas = document.createElement("canvas"); + this.canvas.setAttribute("width", w); + this.canvas.setAttribute("height", h); + this.canvas.className = "ASTEROIDSYEAH"; + Object.assign(this.canvas.style, { + width: w + "px", + height: h + "px", + position: "fixed", + top: "0px", + left: "0px", + bottom: "0px", + right: "0px", + zIndex: "10000" + }); + this.canvas.addEventListener("mousedown", function(e) { + const message = document.createElement("span"); + message.style.position = "absolute"; + message.style.color = "red"; + message.innerHTML = "Press Esc to Quit"; + document.body.appendChild(message); + const x = e.pageX || (e.clientX + document.documentElement.scrollLeft); + const y = e.pageY || (e.clientY + document.documentElement.scrollTop); + message.style.left = x - message.offsetWidth / 2 + "px"; + message.style.top = y - message.offsetHeight / 2 + "px"; + setTimeout(function() { + try { + message.parentNode.removeChild(message); + } catch (e) {} + }, 1000); + }, false); + const eventResize = function() { + that.canvas.style.display = "none"; + w = document.documentElement.clientWidth; + h = document.documentElement.clientHeight; + that.canvas.setAttribute("width", w); + that.canvas.setAttribute("height", h); + Object.assign(that.canvas.style, { + display: "block", + width: w + "px", + height: h + "px" + }); + }; + window.addEventListener("resize", eventResize, false); + this.gameContainer.appendChild(this.canvas); + this.ctx = this.canvas.getContext("2d"); + this.ctx.fillStyle = "black"; + this.ctx.strokeStyle = "black"; + if (!document.getElementById("ASTEROIDS-NAVIGATION")) { + this.navigation = document.createElement("div"); + this.navigation.id = "ASTEROIDS-NAVIGATION"; + this.navigation.className = "ASTEROIDSYEAH"; + Object.assign(this.navigation.style, { + fontFamily: "Arial,sans-serif", + position: "fixed", + zIndex: "10001", + bottom: "20px", + right: "10px", + textAlign: "right" + }); + this.navigation.innerHTML = "(Press Esc to Quit) "; + this.gameContainer.appendChild(this.navigation); + this.points = document.createElement("span"); + this.points.id = "ASTEROIDS-POINTS"; + this.points.style.font = "28pt Arial, sans-serif"; + this.points.style.fontWeight = "bold"; + this.points.className = "ASTEROIDSYEAH"; + this.navigation.appendChild(this.points); + } else { + this.navigation = document.getElementById("ASTEROIDS-NAVIGATION"); + this.points = document.getElementById("ASTEROIDS-POINTS"); + } + setScore(); + const eventKeydown = function(event) { + that.keysPressed[event.key] = true; + switch (event.key) { + case " ": + that.firedAt = 1; + break; + } + if (["ArrowUp", "ArrowDown", "ArrowRight", "ArrowLeft", " ", "b", "w", "a", "s", "d"].includes(event.key)) { + if (event.preventDefault) event.preventDefault(); + if (event.stopPropagation) event.stopPropagation(); + event.returnValue = false; + event.cancelBubble = true; + return false; + } + }; + document.addEventListener("keydown", eventKeydown, false); + const eventKeypress = function(event) { + if (["ArrowUp", "ArrowDown", "ArrowRight", "ArrowLeft", " ", "w", "a", "s", "d"].includes(event.key)) { + if (event.preventDefault) event.preventDefault(); + if (event.stopPropagation) event.stopPropagation(); + event.returnValue = false; + event.cancelBubble = true; + return false; + } + }; + document.addEventListener("keypress", eventKeypress, false); + const eventKeyup = function(event) { + that.keysPressed[event.key] = false; + if (["ArrowUp", "ArrowDown", "ArrowRight", "ArrowLeft", " ", "b", "w", "a", "s", "d"].includes(event.key)) { + if (event.preventDefault) event.preventDefault(); + if (event.stopPropagation) event.stopPropagation(); + event.returnValue = false; + event.cancelBubble = true; + return false; + } + }; + document.addEventListener("keyup", eventKeyup, false); + this.ctx.clear = function() { + this.clearRect(0, 0, w, h); + }; + this.ctx.clear(); + this.ctx.drawLine = function(xFrom, yFrom, xTo, yTo) { + this.beginPath(); + this.moveTo(xFrom, yFrom); + this.lineTo(xTo, yTo); + this.lineTo(xTo + 1, yTo + 1); + this.closePath(); + this.fill(); + }; + this.ctx.tracePoly = function(verts) { + this.beginPath(); + this.moveTo(verts[0][0], verts[0][1]); + for (let i = 1; i < verts.length; i++) + this.lineTo(verts[i][0], verts[i][1]); + this.closePath(); + }; + this.ctx.drawPlayer = function() { + this.save(); + this.translate(that.pos.x, that.pos.y); + this.rotate(that.dir.angle()); + this.tracePoly(playerVerts); + this.fillStyle = "white"; + this.fill(); + this.tracePoly(playerVerts); + this.stroke(); + this.restore(); + }; + this.ctx.drawBullets = function(bullets) { + for (let i = 0; i < bullets.length; i++) { + this.beginPath(); + this.arc(bullets[i].pos.x, bullets[i].pos.y, bulletRadius, 0, Math.PI * 2, true); + this.closePath(); + this.fill(); + } + }; + const randomParticleColor = function() { + return (["red", "yellow"])[random(0, 1)]; + }; + this.ctx.drawParticles = function(particles) { + const oldColor = this.fillStyle; + for (let i = 0; i < particles.length; i++) { + this.fillStyle = randomParticleColor(); + this.drawLine(particles[i].pos.x, particles[i].pos.y, particles[i].pos.x - particles[i].dir.x * 10, particles[i].pos.y - particles[i].dir.y * 10); + } + this.fillStyle = oldColor; + }; + this.ctx.drawFlames = function(flame) { + this.save(); + this.translate(that.pos.x, that.pos.y); + this.rotate(that.dir.angle()); + const oldColor = this.strokeStyle; + this.strokeStyle = "red"; + this.tracePoly(flame.r); + this.stroke(); + this.strokeStyle = "yellow"; + this.tracePoly(flame.y); + this.stroke(); + this.strokeStyle = oldColor; + this.restore(); + } + addParticles(this.pos); + document.body.classList.add("ASTEROIDSYEAH"); + let lastUpdate = new Date().getTime(); + function updateFunc() { + that.update.call(that); + }; + setTimeout(updateFunc, 1000 / FPS); + this.update = function() { + let forceChange = false; + const nowTime = new Date().getTime(); + const tDelta = (nowTime - lastUpdate) / 1000; + lastUpdate = nowTime; + let drawFlame = false; + if (nowTime - this.updated.flame > 50) { + createFlames(); + this.updated.flame = nowTime; + } + this.scrollPos.x = window.pageXOffset || document.documentElement.scrollLeft; + this.scrollPos.y = window.pageYOffset || document.documentElement.scrollTop; + if ((this.keysPressed["ArrowUp"]) || (this.keysPressed["w"])) { + this.vel.add(this.dir.mulNew(acc * tDelta)); + drawFlame = true; + } else { + this.vel.mul(0.96); + } + if ((this.keysPressed["ArrowLeft"]) || (this.keysPressed["a"])) { + forceChange = true; + this.dir.rotate(radians(rotSpeed * tDelta * -1)); + } + if ((this.keysPressed["ArrowRight"]) || (this.keysPressed["d"])) { + forceChange = true; + this.dir.rotate(radians(rotSpeed * tDelta)); + } + if (this.keysPressed[" "] && nowTime - this.firedAt > timeBetweenFire) { + this.bullets.unshift({ + dir: this.dir.cp(), + pos: this.pos.cp(), + startVel: this.vel.cp(), + cameAlive: nowTime + }); + this.firedAt = nowTime; + if (this.bullets.length > maxBullets) { + this.bullets.pop(); + } + } + if (this.keysPressed["b"]) { + if (!this.updated.enemies) { + updateEnemyIndex(); + this.updated.enemies = true; + } + forceChange = true; + this.updated.blink.time += tDelta * 1000; + if (this.updated.blink.time > timeBetweenBlink) { + this.toggleBlinkStyle(); + this.updated.blink.time = 0; + } + } else { + this.updated.enemies = false; + } + if (this.keysPressed["Escape"]) { + destroy.apply(this); + return; + } + if (this.vel.len() > maxSpeed) { + this.vel.setLength(maxSpeed); + } + this.pos.add(this.vel.mulNew(tDelta)); + if (this.pos.x > w) { + window.scrollTo(this.scrollPos.x + 50, this.scrollPos.y); + this.pos.x = 0; + } else if (this.pos.x < 0) { + window.scrollTo(this.scrollPos.x - 50, this.scrollPos.y); + this.pos.x = w; + } + if (this.pos.y > h) { + window.scrollTo(this.scrollPos.x, this.scrollPos.y + h * 0.75); + this.pos.y = 0; + } else if (this.pos.y < 0) { + window.scrollTo(this.scrollPos.x, this.scrollPos.y - h * 0.75); + this.pos.y = h; + } + for (let i = this.bullets.length - 1; i >= 0; i--) { + if (nowTime - this.bullets[i].cameAlive > 2000) { + this.bullets.splice(i, 1); + forceChange = true; + continue; + } + const bulletVel = this.bullets[i].dir.setLengthNew(bulletSpeed * tDelta).add(this.bullets[i].startVel.mulNew(tDelta)); + this.bullets[i].pos.add(bulletVel); + boundsCheck(this.bullets[i].pos); + const murdered = getElementFromPoint(this.bullets[i].pos.x, this.bullets[i].pos.y); + if (murdered && murdered.tagName && !(ignoredTypes.includes(murdered.tagName.toUpperCase())) && hasOnlyTextualChildren(murdered) && murdered.className !== "ASTEROIDSYEAH") { + addParticles(this.bullets[i].pos); + this.dying.push(murdered); + this.bullets.splice(i, 1); + continue; + } + } + if (this.dying.length) { + for (let i = this.dying.length - 1; i >= 0; i--) { + try { + if (this.dying[i].parentNode) window.ASTEROIDS.enemiesKilled++; + this.dying[i].parentNode.removeChild(this.dying[i]); + } catch (e) {} + } + setScore(); + this.dying = []; + } + for (let i = this.particles.length - 1; i >= 0; i--) { + this.particles[i].pos.add(this.particles[i].dir.mulNew(particleSpeed * tDelta * Math.random())); + if (nowTime - this.particles[i].cameAlive > 1000) { + this.particles.splice(i, 1); + forceChange = true; + continue; + } + } + if (forceChange || this.bullets.length !== 0 || this.particles.length !== 0 || !this.pos.is(this.lastPos) || this.vel.len() > 0) { + this.ctx.clear(); + this.ctx.drawPlayer(); + if (drawFlame) this.ctx.drawFlames(that.flame); + if (this.bullets.length) { + this.ctx.drawBullets(this.bullets); + } + if (this.particles.length) { + this.ctx.drawParticles(this.particles); + } + } + this.lastPos = this.pos; + setTimeout(updateFunc, 1000 / FPS); + } + + function destroy() { + document.removeEventListener("keydown", eventKeydown, false); + document.removeEventListener("keypress", eventKeypress, false); + document.removeEventListener("keyup", eventKeyup, false); + window.removeEventListener("resize", eventResize, false); + removeStylesheet("ASTEROIDSYEAHSTYLES"); + document.body.classList.remove("ASTEROIDSYEAH"); + this.gameContainer.parentNode.removeChild(this.gameContainer); + }; +} + +if (!window.ASTEROIDSPLAYERS) window.ASTEROIDSPLAYERS = []; +window.ASTEROIDSPLAYERS.push(new Asteroids()); \ No newline at end of file diff --git a/packages/live2d/src/live2d/tools/ai-chat.ts b/packages/live2d/src/live2d/tools/ai-chat.ts new file mode 100644 index 0000000..a239136 --- /dev/null +++ b/packages/live2d/src/live2d/tools/ai-chat.ts @@ -0,0 +1,20 @@ +import { isNotEmptyString } from "../../utils/isString"; +import { Tool } from "./tools"; + +/** + * AI 聊天工具 + */ +export class AIChatTool extends Tool { + name() { + return "AIChat"; + } + + icon() { + const icon = this.getConfig().aiChatUrl; + return isNotEmptyString(icon) ? icon : "ph-chats-circle-fill"; + } + + execute() { + // TODO: 打开 AI 聊天 + } +} \ No newline at end of file diff --git a/packages/live2d/src/live2d/tools/asteroids.ts b/packages/live2d/src/live2d/tools/asteroids.ts new file mode 100644 index 0000000..d96a4b1 --- /dev/null +++ b/packages/live2d/src/live2d/tools/asteroids.ts @@ -0,0 +1,29 @@ +import { isNotEmptyString } from "../../utils/isString"; +import { Tool } from "./tools"; + +declare global { + interface Window { + ASTEROIDSPLAYERS: unknown[]; + } +} + +/** + * 小宇宙小游戏工具 + */ +export class AsteroidsTool extends Tool { + name() { + return "Asteroids"; + } + + icon() { + const icon = this.getConfig().asteroidsIcon; + return isNotEmptyString(icon) ? icon : "ph-paper-plane-tilt-fill"; + } + + execute() { + // @ts-ignore + import("@libs/asteroids.min.js").then((module) => { + new module.default(); + }); + } +} \ No newline at end of file diff --git a/packages/live2d/src/live2d/tools/custom-tool.ts b/packages/live2d/src/live2d/tools/custom-tool.ts new file mode 100644 index 0000000..53e56eb --- /dev/null +++ b/packages/live2d/src/live2d/tools/custom-tool.ts @@ -0,0 +1,39 @@ +import type { Live2dConfig } from "context/config-context"; +import { isNotEmptyString } from "../../utils/isString"; +import { Tool } from "./tools"; +import { _getFullOrDefaultTips } from '../../events/tip-events'; + +export type CustomToolConfig = { + name: string; + icon?: string; + execute: () => void; +} + +/** + * 自定义工具 + */ +export class CustomTool extends Tool { + _name: string; + _icon?: string; + _execute: () => void; + + constructor(config: Live2dConfig, { name, icon, execute }: CustomToolConfig) { + super(config); + this._name = name; + this._icon = icon; + this._execute = execute; + } + + name() { + return this._name; + } + + icon() { + const icon = this._icon; + return isNotEmptyString(icon) ? icon : "ph-question-fill"; + } + + execute() { + this._execute.bind(this)(); + } +} \ No newline at end of file diff --git a/packages/live2d/src/live2d/tools/hitokoto.ts b/packages/live2d/src/live2d/tools/hitokoto.ts new file mode 100644 index 0000000..5ef04f8 --- /dev/null +++ b/packages/live2d/src/live2d/tools/hitokoto.ts @@ -0,0 +1,73 @@ +import queryString from "query-string"; +import { isNotEmptyString } from "../../utils/isString"; +import { Tool } from "./tools"; +import { sendMessage } from "../../helpers/sendMessage"; + +/** + * 一言工具,使用一言接口获取一句话 + * 如需使用自定义的接口,则需要满足 hitokoto 的接口规范。 + * + * @link https://developer.hitokoto.cn/sentence/demo.html + */ +export class HitokotoTool extends Tool { + _default_api = "https://v1.hitokoto.cn"; + + name() { + return "Hitokoto"; + } + + icon() { + const icon = this.getConfig().aiChatUrl; + return isNotEmptyString(icon) ? icon : "ph-chat-circle-fill"; + } + + async execute() { + const { hitokoto, description } = await this._getHitokotoMessage() || {}; + if (isNotEmptyString(hitokoto)) { + sendMessage(hitokoto, 6000, 2); + setTimeout(() => { + sendMessage(description, 4000, 2); + }, 6000); + } + } + + private async _getHitokotoMessage(): Promise<{ hitokoto: string, description: string } | undefined> { + const unverifiedApi = this.getConfig().hitokotoApi || this._default_api; + const parsedApi = queryString.parseUrl(unverifiedApi); + const newParams = { ...parsedApi.query, encode: "json", charset: "utf-8" }; + const hitokotoApi = `${parsedApi.url}?${queryString.stringify(newParams)}`; + const { hitokoto, from, creator } = await this._fetchHitokoto(hitokotoApi); + if (isNotEmptyString(hitokoto)) { + return { + hitokoto: "hitokoto", + description: `这句一言来自 「${from}」,是 ${creator} 在 hitokoto.cn 投稿的。` + } + } + } + + private _fetchHitokoto(hitokotoApi: string): Promise { + return fetch(hitokotoApi) + .then(res => res.json()) + .then((result: HitokotoResult) => { + return result; + }); + } +} + +/** + * @link https://developer.hitokoto.cn/sentence/#%E8%BF%94%E5%9B%9E%E4%BF%A1%E6%81%AF + */ +export type HitokotoResult = { + id?: number; + hitokoto?: string; + type?: string; + from?: string; + from_who?: string; + creator?: string; + creator_uid?: number; + reviewer?: number; + uuid?: string; + commit_from?: string; + created_at?: string; + length?: number; +} \ No newline at end of file diff --git a/packages/live2d/src/live2d/tools/info.ts b/packages/live2d/src/live2d/tools/info.ts new file mode 100644 index 0000000..8629ca4 --- /dev/null +++ b/packages/live2d/src/live2d/tools/info.ts @@ -0,0 +1,21 @@ +import { isNotEmptyString } from "../../utils/isString"; +import { Tool } from "./tools"; + +/** + * 前往站点工具 + */ +export class InfoTool extends Tool { + name() { + return "InfoTool"; + } + + icon() { + const icon = this.getConfig().infoIcon; + return isNotEmptyString(icon) ? icon : "ph-info-fill"; + } + + execute() { + const siteUrl = this.getConfig().infoSite || "https://github.com/LIlGG/plugin-live2d"; + window.open(siteUrl); + } +} \ No newline at end of file diff --git a/packages/live2d/src/live2d/tools/screenshot.ts b/packages/live2d/src/live2d/tools/screenshot.ts new file mode 100644 index 0000000..8d9ccb9 --- /dev/null +++ b/packages/live2d/src/live2d/tools/screenshot.ts @@ -0,0 +1,29 @@ +import { sendMessage } from "helpers/sendMessage"; +import { isNotEmptyString } from "../../utils/isString"; +import { Tool } from "./tools"; + +declare const Live2D: { + captureName: string; + captureFrame: boolean; +}; + +/** + * 截图工具 + */ +export class ScreenshotTool extends Tool { + name() { + return "Screenshot"; + } + + icon() { + const icon = this.getConfig().screenshotIcon; + return isNotEmptyString(icon) ? icon : "ph-arrows-counter-clockwise-fill"; + } + + execute() { + sendMessage("照好了嘛,是不是很可爱呢?", 6000, 2); + const screenshotName = this.getConfig().screenshotName || 'live2d'; + Live2D.captureName = `${screenshotName}.png`; + Live2D.captureFrame = true; + } +} \ No newline at end of file diff --git a/packages/live2d/src/live2d/tools/switch-model.ts b/packages/live2d/src/live2d/tools/switch-model.ts new file mode 100644 index 0000000..52cc0f2 --- /dev/null +++ b/packages/live2d/src/live2d/tools/switch-model.ts @@ -0,0 +1,20 @@ +import { isNotEmptyString } from "../../utils/isString"; +import { Tool } from "./tools"; + +/** + * 切换模型工具 + */ +export class SwitchModelTool extends Tool { + name() { + return "SwitchModel"; + } + + icon() { + const icon = this.getConfig().switchModelIcon; + return isNotEmptyString(icon) ? icon : "ph-dress-fill"; + } + + execute() { + console.log("Model switch event emitted."); + } +} \ No newline at end of file diff --git a/packages/live2d/src/live2d/tools/switch-texture.ts b/packages/live2d/src/live2d/tools/switch-texture.ts new file mode 100644 index 0000000..a54b70d --- /dev/null +++ b/packages/live2d/src/live2d/tools/switch-texture.ts @@ -0,0 +1,20 @@ +import { isNotEmptyString } from "../../utils/isString"; +import { Tool } from "./tools"; + +/** + * 切换纹理工具 + */ +export class SwitchTextureTool extends Tool { + name() { + return "SwitchTexture"; + } + + icon() { + const icon = this.getConfig().switchTextureIcon; + return isNotEmptyString(icon) ? icon : "ph-camera-fill"; + } + + execute() { + // 发出切换模型的事件 + } +} \ No newline at end of file diff --git a/packages/live2d/src/live2d/tools/tools.ts b/packages/live2d/src/live2d/tools/tools.ts new file mode 100644 index 0000000..40cb404 --- /dev/null +++ b/packages/live2d/src/live2d/tools/tools.ts @@ -0,0 +1,19 @@ +import type { Live2dConfig } from "../../context/config-context"; + +export abstract class Tool { + private _config: Live2dConfig; + + constructor(config: Live2dConfig) { + this._config = config; + } + + abstract name(): string; + + abstract icon(): string; + + abstract execute(): void; + + protected getConfig(): Live2dConfig { + return this._config; + } +} \ No newline at end of file diff --git a/packages/live2d/tsconfig.json b/packages/live2d/tsconfig.json index 0b26a03..7becaa1 100644 --- a/packages/live2d/tsconfig.json +++ b/packages/live2d/tsconfig.json @@ -1,31 +1,36 @@ { - "compilerOptions": { - "lib": ["ES2020", "DOM", "DOM.Iterable"], - "jsx": "react-jsx", - "target": "ES2020", - "noEmit": true, - "skipLibCheck": true, + "compilerOptions": { + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "jsx": "react-jsx", + "target": "ES2020", + "noEmit": true, + "skipLibCheck": true, - /* modules */ - "module": "ESNext", - "moduleResolution": "bundler", - "allowImportingTsExtensions": true, - "resolveJsonModule": true, - "isolatedModules": true, + /* modules */ + "module": "ESNext", + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, - /* Linting */ - "strict": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noFallthroughCasesInSwitch": true, + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, - "experimentalDecorators": true, - "useDefineForClassFields": false, - "plugins": [ - { - "name": "ts-lit-plugin" - } - ] - }, - "include": ["src"] + "experimentalDecorators": true, + "useDefineForClassFields": false, + "plugins": [ + { + "name": "ts-lit-plugin" + } + ], + "baseUrl": "./src", + "paths": { + "@libs/*": ["libs/*"], // 定义别名 + "@utils/*": ["utils/*"] + } + }, + "include": ["src"] } From 874b8ffd64fbf21327f719b535784cbc848be2f9 Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Thu, 20 Feb 2025 01:33:21 +0800 Subject: [PATCH 09/12] refactor: restructure Live2D events --- .../live2d/src/components/Live2dCanvas.tsx | 9 +- packages/live2d/src/components/Live2dTips.tsx | 3 +- .../live2d/src/components/Live2dToggle.tsx | 100 +++++++++--------- .../live2d/src/components/Live2dTools.tsx | 27 ++--- .../live2d/src/components/Live2dWidget.tsx | 4 +- .../live2d/src/events/add-default-message.ts | 23 ++++ packages/live2d/src/events/before-init.ts | 23 ++++ packages/live2d/src/events/event.d.ts | 55 ---------- packages/live2d/src/events/send-message.ts | 28 +++++ packages/live2d/src/events/tip-events.ts | 12 +-- packages/live2d/src/events/toggle-canvas.ts | 26 +++++ packages/live2d/src/events/types.ts | 5 + .../live2d/src/live2d/tools/custom-tool.ts | 4 +- packages/live2d/src/live2d/tools/exit.ts | 26 +++++ packages/live2d/tsconfig.json | 4 +- pnpm-lock.yaml | 31 ++++++ 16 files changed, 243 insertions(+), 137 deletions(-) create mode 100644 packages/live2d/src/events/add-default-message.ts create mode 100644 packages/live2d/src/events/before-init.ts delete mode 100644 packages/live2d/src/events/event.d.ts create mode 100644 packages/live2d/src/events/send-message.ts create mode 100644 packages/live2d/src/events/toggle-canvas.ts create mode 100644 packages/live2d/src/events/types.ts create mode 100644 packages/live2d/src/live2d/tools/exit.ts diff --git a/packages/live2d/src/components/Live2dCanvas.tsx b/packages/live2d/src/components/Live2dCanvas.tsx index 5d738a3..134ab68 100644 --- a/packages/live2d/src/components/Live2dCanvas.tsx +++ b/packages/live2d/src/components/Live2dCanvas.tsx @@ -7,6 +7,7 @@ import Model from "../live2d/model"; import { consume } from "@lit/context"; import { configContext, type Live2dConfig } from "../context/config-context"; import "../libs/live2d.min.js"; +import { BeforeInitEvent } from "../events/before-init.js"; export class Live2dCanvas extends UnoLitElement { @consume({ context: configContext }) @@ -30,13 +31,7 @@ export class Live2dCanvas extends UnoLitElement { connectedCallback(): void { super.connectedCallback(); // 发出 Live2d beforeInit 事件 - window.dispatchEvent( - new CustomEvent("live2d:before-init", { - detail: { - config: this.config, - }, - }), - ); + window.dispatchEvent(new BeforeInitEvent({ config: this.config })); } protected firstUpdated(_changedProperties: PropertyValues): void { diff --git a/packages/live2d/src/components/Live2dTips.tsx b/packages/live2d/src/components/Live2dTips.tsx index 0fecdfe..552ad2f 100644 --- a/packages/live2d/src/components/Live2dTips.tsx +++ b/packages/live2d/src/components/Live2dTips.tsx @@ -9,6 +9,7 @@ import { isNotEmpty } from "../utils/isNotEmpty"; import { randomSelection } from "../utils/randomSelection"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import { classMap } from "lit/directives/class-map.js"; +import { SendMessageEvent } from "../events/send-message"; export class Live2dTips extends UnoLitElement { @consume({ context: configContext }) @@ -52,7 +53,7 @@ export class Live2dTips extends UnoLitElement { window.removeEventListener("live2d:send-message", this.handleMessage.bind(this)); } - handleMessage(e: CustomEvent): void { + handleMessage(e: SendMessageEvent): void { const { text, timeout, priority } = e.detail; if (!isNotEmpty(text)) { return; diff --git a/packages/live2d/src/components/Live2dToggle.tsx b/packages/live2d/src/components/Live2dToggle.tsx index aa46cb5..209faa0 100644 --- a/packages/live2d/src/components/Live2dToggle.tsx +++ b/packages/live2d/src/components/Live2dToggle.tsx @@ -3,66 +3,68 @@ import { UnoLitElement } from "../common/UnoLitElement"; import { createComponent } from "@lit/react"; import React from "react"; import { state } from "lit/decorators.js"; +import { ToggleCanvasEvent } from "../events/toggle-canvas"; export class Live2dToggle extends UnoLitElement { - @state() - // 当前工具栏是否显示 - private _isShow = false; + @state() + // 当前工具栏是否显示 + private _isShow = false; - connectedCallback(): void { - super.connectedCallback(); - this.addEventListener("click", this.handleClick); + connectedCallback(): void { + super.connectedCallback(); + this.addEventListener("click", this.handleClick); - // 初始化时,判断是否已经隐藏看板娘超过一天,如果是,则显示看板娘。否则,继续隐藏看板娘。 - const live2dDisplay = localStorage.getItem("live2d-display"); - if (live2dDisplay) { - if (Date.now() - Number.parseInt(live2dDisplay) <= 24 * 60 * 60 * 1000) { - this.triggerToggleLive2d(false); - return; - } - } - this.triggerToggleLive2d(true); - } + // 初始化时,判断是否已经隐藏看板娘超过一天,如果是,则显示看板娘。否则,继续隐藏看板娘。 + const live2dDisplay = localStorage.getItem("live2d-display"); + if (live2dDisplay) { + if (Date.now() - Number.parseInt(live2dDisplay) <= 24 * 60 * 60 * 1000) { + this.triggerToggleLive2d(false); + return; + } + } + this.triggerToggleLive2d(true); + } - disconnectedCallback(): void { - super.disconnectedCallback(); - this.removeEventListener("click", this.handleClick); - } + disconnectedCallback(): void { + super.disconnectedCallback(); + this.removeEventListener("click", this.handleClick); + } - render(): TemplateResult { - return html`
- 看板娘 -
`; - } + render(): TemplateResult { + return html`
+ 看板娘 +
`; + } - handleClick() { - this.triggerToggleLive2d(!!this._isShow); - } + handleClick() { + this.triggerToggleLive2d(!!this._isShow); + } - triggerToggleLive2d(isShow: boolean) { - // 当前切换栏与 Live2d 的显示状态相反 - this._isShow = !isShow; - if (isShow) { - localStorage.removeItem("live2d-display"); - } else { - localStorage.setItem("live2d-display", Date.now().toString()); - } - this.dispatchEvent( - new CustomEvent("live2d:toggle-canvas", { - bubbles: true, - composed: true, - detail: { - isShow, - }, - }), - ); - } + triggerToggleLive2d(isShow: boolean) { + // 当前切换栏与 Live2d 的显示状态相反 + this._isShow = !isShow; + if (isShow) { + localStorage.removeItem("live2d-display"); + } else { + localStorage.setItem("live2d-display", Date.now().toString()); + } + this.dispatchEvent( + new ToggleCanvasEvent({ + isShow, + }) + ); + } } customElements.define("live2d-toggle", Live2dToggle); export const Live2dToggleComponent = createComponent({ - tagName: "live2d-toggle", - elementClass: Live2dToggle, - react: React, + tagName: "live2d-toggle", + elementClass: Live2dToggle, + react: React, }); diff --git a/packages/live2d/src/components/Live2dTools.tsx b/packages/live2d/src/components/Live2dTools.tsx index 65821ef..5f14ab4 100644 --- a/packages/live2d/src/components/Live2dTools.tsx +++ b/packages/live2d/src/components/Live2dTools.tsx @@ -7,23 +7,24 @@ import { configContext, type Live2dConfig } from "../context/config-context"; import { property } from "lit/decorators.js"; export class Live2dTools extends UnoLitElement { - @consume({ context: configContext }) - @property({ attribute: false }) - public config?: Live2dConfig; + @consume({ context: configContext }) + @property({ attribute: false }) + public config?: Live2dConfig; - render(): TemplateResult { - return html` -
- -
- `; - } + constructor() { + super(); + console.log("Live2dTools constructor", this.config); + } + + render(): TemplateResult { + return html`
`; + } } customElements.define("live2d-tools", Live2dTools); export const Live2dToolsComponent = createComponent({ - tagName: "live2d-tools", - elementClass: Live2dTools, - react: React, + tagName: "live2d-tools", + elementClass: Live2dTools, + react: React, }); diff --git a/packages/live2d/src/components/Live2dWidget.tsx b/packages/live2d/src/components/Live2dWidget.tsx index 289a3c4..6fd1414 100644 --- a/packages/live2d/src/components/Live2dWidget.tsx +++ b/packages/live2d/src/components/Live2dWidget.tsx @@ -9,6 +9,7 @@ import "./Live2dToggle"; import "./Live2dTips"; import "./Live2dCanvas"; import "./Live2dTools"; +import { ToggleCanvasEvent } from "../events/toggle-canvas"; export class Live2dWidget extends UnoLitElement { @consume({ context: configContext }) @@ -43,7 +44,8 @@ export class Live2dWidget extends UnoLitElement { } } - handleToggleWidget(e: CustomEvent) { + handleToggleWidget(e: ToggleCanvasEvent) { + console.log(e); this._isShow = e.detail.isShow; } } diff --git a/packages/live2d/src/events/add-default-message.ts b/packages/live2d/src/events/add-default-message.ts new file mode 100644 index 0000000..b00a15f --- /dev/null +++ b/packages/live2d/src/events/add-default-message.ts @@ -0,0 +1,23 @@ +import { Live2dEvent } from "./types"; + +export const ADD_DEFAULT_MESSAGE_EVENT_NAME = "live2d:add-default-message" as const; + +declare global { + interface GlobalEventHandlersEventMap { + [ADD_DEFAULT_MESSAGE_EVENT_NAME]: AddDefaultMessageEvent; + } +} + +export interface Live2dAddDefaultMessageEventDetail { + // 默认消息 + message: string[] | string; +} + +/** + * 添加默认消息事件 + */ +export class AddDefaultMessageEvent extends Live2dEvent { + constructor(detail: Live2dAddDefaultMessageEventDetail) { + super(ADD_DEFAULT_MESSAGE_EVENT_NAME, detail); + } +} \ No newline at end of file diff --git a/packages/live2d/src/events/before-init.ts b/packages/live2d/src/events/before-init.ts new file mode 100644 index 0000000..7d62f1c --- /dev/null +++ b/packages/live2d/src/events/before-init.ts @@ -0,0 +1,23 @@ +import { Live2dConfig } from "context/config-context"; +import { Live2dEvent } from "./types"; + +export const BEFORE_INIT_EVENT_NAME = "live2d:before-init" as const; + +declare global { + interface GlobalEventHandlersEventMap { + [BEFORE_INIT_EVENT_NAME]: BeforeInitEvent; + } +} + +export interface Live2dBeforeInitEventDetail { + config?: Live2dConfig +} + +/** + * Live2d 初始化前事件 + */ +export class BeforeInitEvent extends Live2dEvent { + constructor(detail: Live2dBeforeInitEventDetail) { + super(BEFORE_INIT_EVENT_NAME, detail); + } +} diff --git a/packages/live2d/src/events/event.d.ts b/packages/live2d/src/events/event.d.ts deleted file mode 100644 index 417d7ca..0000000 --- a/packages/live2d/src/events/event.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent) */ -interface CustomEvent extends Event { - /** - * Returns any custom data event was created with. Typically used for synthetic events. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent/detail) - */ - readonly detail: T; - /** - * @deprecated - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent/initCustomEvent) - */ - initCustomEvent(type: keyof GlobalEventHandlersEventMap, bubbles?: boolean, cancelable?: boolean, detail?: T): void; -} - - -// 扩展全局事件映射 -interface GlobalEventHandlersEventMap { - // Live2d beforeInit 事件 - "live2d:before-init": CustomEvent; - - // 切换 canvas 显示状态事件 - "live2d:toggle-canvas": CustomEvent; - - // 发送 Live2D 消息事件 - "live2d:send-message": CustomEvent; - - // 添加默认消息事件 - "live2d:add-default-message": CustomEvent; -} - -interface Live2dMessageEventDetail { - // 消息内容 - text: string[] | string; - // 消息显示时间 - timeout: number; - // 消息优先级 - priority: number; -} - -interface Live2dBeforeInitEventDetail { - // Live2D 配置 - config: Live2dConfig -} - -interface Live2dToggleEventDetail { - // 是否显示看板娘 - isShow: boolean; -} - -interface Live2dAddDefaultMessageEventDetail { - // 默认消息 - message: string[] | string; -} diff --git a/packages/live2d/src/events/send-message.ts b/packages/live2d/src/events/send-message.ts new file mode 100644 index 0000000..126642a --- /dev/null +++ b/packages/live2d/src/events/send-message.ts @@ -0,0 +1,28 @@ +import { Live2dEvent } from "./types"; + +export const SEND_MESSAGE_EVENT_NAME = "live2d:send-message" as const; + +declare global { + interface GlobalEventHandlersEventMap { + [SEND_MESSAGE_EVENT_NAME]: SendMessageEvent; + } +} + +export interface Live2dMessageEventDetail { + // 消息内容 + text: string[] | string; + // 消息显示时间 + timeout: number; + // 消息优先级 + priority: number; +} + + +/** + * 发送消息事件 + */ +export class SendMessageEvent extends Live2dEvent { + constructor(detail: Live2dMessageEventDetail) { + super(SEND_MESSAGE_EVENT_NAME, detail); + } +} diff --git a/packages/live2d/src/events/tip-events.ts b/packages/live2d/src/events/tip-events.ts index 8b26ddb..372b1d1 100644 --- a/packages/live2d/src/events/tip-events.ts +++ b/packages/live2d/src/events/tip-events.ts @@ -8,9 +8,13 @@ import { timeWithinRange } from "../helpers/timeWithinRange"; import { isNotEmptyString, isString } from "../utils/isString"; import { randomSelection } from "../utils/randomSelection"; import { documentTitle, getReferrerDomain, hasWebsiteHome } from "../utils/util"; +import { AddDefaultMessageEvent } from "./add-default-message"; window.addEventListener("live2d:before-init", async (e) => { const config = e.detail.config; + if (!config) { + return; + } const tips = await _loadTips(config); if (!tips) { return; @@ -43,13 +47,7 @@ const _welcomeEvent = (times: TipTime[]) => { const _holidayEvent = (seasons: TipSeason[]) => { for (const { date, text } of seasons) { if (dataWithinRange(date)) { - window.dispatchEvent( - new CustomEvent("live2d:add-default-message", { - detail: { - message: text, - } - }) - ); + window.dispatchEvent(new AddDefaultMessageEvent({ message: text })); } } } diff --git a/packages/live2d/src/events/toggle-canvas.ts b/packages/live2d/src/events/toggle-canvas.ts new file mode 100644 index 0000000..3c107d5 --- /dev/null +++ b/packages/live2d/src/events/toggle-canvas.ts @@ -0,0 +1,26 @@ +import { Live2dEvent } from "./types"; + +export const TOGGLE_CANVAS_EVENT_NAME = "live2d:toggle-canvas" as const; + +declare global { + interface GlobalEventHandlersEventMap { + [TOGGLE_CANVAS_EVENT_NAME]: ToggleCanvasEvent; + } +} + +export interface Live2dToggleCanvasEventDetail { + // 是否显示看板娘 + isShow: boolean; +} + +/** + * 切换 canvas 显示状态事件 + */ +export class ToggleCanvasEvent extends Live2dEvent { + constructor(detail: Live2dToggleCanvasEventDetail) { + super(TOGGLE_CANVAS_EVENT_NAME, detail, { + bubbles: true, + composed: true, + }); + } +} diff --git a/packages/live2d/src/events/types.ts b/packages/live2d/src/events/types.ts new file mode 100644 index 0000000..a79b7e9 --- /dev/null +++ b/packages/live2d/src/events/types.ts @@ -0,0 +1,5 @@ +export abstract class Live2dEvent extends CustomEvent { + constructor(type: string, detail: T, options?: EventInit) { + super(type, { detail, ...options }); + } +} \ No newline at end of file diff --git a/packages/live2d/src/live2d/tools/custom-tool.ts b/packages/live2d/src/live2d/tools/custom-tool.ts index 53e56eb..41bf65f 100644 --- a/packages/live2d/src/live2d/tools/custom-tool.ts +++ b/packages/live2d/src/live2d/tools/custom-tool.ts @@ -1,7 +1,7 @@ import type { Live2dConfig } from "context/config-context"; -import { isNotEmptyString } from "../../utils/isString"; +import { isNotEmptyString } from "utils/isString"; import { Tool } from "./tools"; -import { _getFullOrDefaultTips } from '../../events/tip-events'; +import { _getFullOrDefaultTips } from '../events/tip-events'; export type CustomToolConfig = { name: string; diff --git a/packages/live2d/src/live2d/tools/exit.ts b/packages/live2d/src/live2d/tools/exit.ts new file mode 100644 index 0000000..6bde45b --- /dev/null +++ b/packages/live2d/src/live2d/tools/exit.ts @@ -0,0 +1,26 @@ +import { sendMessage } from "helpers/sendMessage"; +import { isNotEmptyString } from "@utils/isString"; +import { Tool } from "./tools"; +import { ToggleCanvasEvent } from "../events/toggle-canvas"; + +/** + * 退出 Live2d 工具 + */ +export class ExitTool extends Tool { + name() { + return "ExitTool"; + } + + icon() { + const icon = this.getConfig().exitIcon; + return isNotEmptyString(icon) ? icon : "ph-x-bold"; + } + + execute() { + sendMessage("愿你有一天能与重要的人重逢。", 2000, 4); + setTimeout(() => { + // 触发退出 Live2d 事件 + window.dispatchEvent(new ToggleCanvasEvent({ isShow: false })); + }, 3000) + } +} \ No newline at end of file diff --git a/packages/live2d/tsconfig.json b/packages/live2d/tsconfig.json index 7becaa1..3107442 100644 --- a/packages/live2d/tsconfig.json +++ b/packages/live2d/tsconfig.json @@ -28,8 +28,8 @@ ], "baseUrl": "./src", "paths": { - "@libs/*": ["libs/*"], // 定义别名 - "@utils/*": ["utils/*"] + "@libs/*": ["libs/*"], + "@utils/*": ["utils/*"], } }, "include": ["src"] diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4286167..9acb9aa 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -26,6 +26,9 @@ importers: lit: specifier: ^3.2.1 version: 3.2.1 + query-string: + specifier: ^9.1.1 + version: 9.1.1 react: specifier: ^19.0.0 version: 19.0.0 @@ -916,6 +919,10 @@ packages: supports-color: optional: true + decode-uri-component@0.4.1: + resolution: {integrity: sha512-+8VxcR21HhTy8nOt6jf20w0c9CADrw1O8d+VZ/YzzCt4bJ3uBjw+D1q2osAB8RnpwwaeYBxy0HyKQxD5JBMuuQ==} + engines: {node: '>=14.16'} + defu@6.1.4: resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} @@ -979,6 +986,10 @@ packages: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} + filter-obj@5.1.0: + resolution: {integrity: sha512-qWeTREPoT7I0bifpPUXtxkZJ1XJzxWtfoWWkdVGqa+eCr3SHW/Ocp89o8vLvbUuQnadybJpjOKu4V+RwO6sGng==} + engines: {node: '>=14.16'} + fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -1164,6 +1175,10 @@ packages: resolution: {integrity: sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ==} engines: {node: ^10 || ^12 || >=14} + query-string@9.1.1: + resolution: {integrity: sha512-MWkCOVIcJP9QSKU52Ngow6bsAWAPlPK2MludXvcrS2bGZSl+T1qX9MZvRIkqUIkGLJquMJHWfsT6eRqUpp4aWg==} + engines: {node: '>=18'} + queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} @@ -1228,6 +1243,10 @@ packages: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} + split-on-first@3.0.0: + resolution: {integrity: sha512-qxQJTx2ryR0Dw0ITYyekNQWpz6f8dGd7vffGNflQQ3Iqj9NJ6qiZ7ELpZsJ/QBhIVAiDfXdag3+Gp8RvWa62AA==} + engines: {node: '>=12'} + string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -2227,6 +2246,8 @@ snapshots: dependencies: ms: 2.1.3 + decode-uri-component@0.4.1: {} + defu@6.1.4: {} destr@2.0.3: {} @@ -2326,6 +2347,8 @@ snapshots: dependencies: to-regex-range: 5.0.1 + filter-obj@5.1.0: {} + fsevents@2.3.3: optional: true @@ -2495,6 +2518,12 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 + query-string@9.1.1: + dependencies: + decode-uri-component: 0.4.1 + filter-obj: 5.1.0 + split-on-first: 3.0.0 + queue-microtask@1.2.3: {} react-dom@19.0.0(react@19.0.0): @@ -2568,6 +2597,8 @@ snapshots: source-map@0.6.1: optional: true + split-on-first@3.0.0: {} + string-width@4.2.3: dependencies: emoji-regex: 8.0.0 From c0124d233d6e721a68e33792d23d7d407107c3e4 Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Tue, 25 Feb 2025 01:01:06 +0800 Subject: [PATCH 10/12] feat: complete most functionalities of the toolbar --- packages/live2d/package.json | 1 + .../live2d/src/components/Live2dCanvas.tsx | 2 +- .../live2d/src/components/Live2dTools.tsx | 86 +++++++++++++++++-- .../live2d/src/components/Live2dWidget.tsx | 65 +++++++------- packages/live2d/src/context/config-context.ts | 5 ++ packages/live2d/src/helpers/sendMessage.ts | 25 +++--- packages/live2d/src/live2d/tools/ai-chat.ts | 6 +- packages/live2d/src/live2d/tools/asteroids.ts | 9 +- .../live2d/src/live2d/tools/custom-tool.ts | 32 +++++-- packages/live2d/src/live2d/tools/exit.ts | 14 ++- packages/live2d/src/live2d/tools/hitokoto.ts | 22 ++--- packages/live2d/src/live2d/tools/index.ts | 25 ++++++ packages/live2d/src/live2d/tools/info.ts | 11 ++- .../live2d/src/live2d/tools/screenshot.ts | 12 ++- .../live2d/src/live2d/tools/switch-model.ts | 6 +- .../live2d/src/live2d/tools/switch-texture.ts | 8 +- packages/live2d/src/live2d/tools/tools.ts | 10 ++- packages/live2d/tsconfig.json | 9 +- packages/live2d/tsconfig.tsbuildinfo | 2 +- packages/live2d/vite.config.ts | 36 +++++--- 20 files changed, 251 insertions(+), 135 deletions(-) create mode 100644 packages/live2d/src/live2d/tools/index.ts diff --git a/packages/live2d/package.json b/packages/live2d/package.json index 1ea064e..0c484a4 100644 --- a/packages/live2d/package.json +++ b/packages/live2d/package.json @@ -22,6 +22,7 @@ "dependencies": { "@lit/context": "^1.1.3", "@lit/react": "^1.0.7", + "iconify-icon": "^2.3.0", "lit": "^3.2.1", "query-string": "^9.1.1", "react": "^19.0.0", diff --git a/packages/live2d/src/components/Live2dCanvas.tsx b/packages/live2d/src/components/Live2dCanvas.tsx index 134ab68..bfacf06 100644 --- a/packages/live2d/src/components/Live2dCanvas.tsx +++ b/packages/live2d/src/components/Live2dCanvas.tsx @@ -22,7 +22,7 @@ export class Live2dCanvas extends UnoLitElement { render(): TemplateResult { return html` - + `; diff --git a/packages/live2d/src/components/Live2dTools.tsx b/packages/live2d/src/components/Live2dTools.tsx index 5f14ab4..7b80d3c 100644 --- a/packages/live2d/src/components/Live2dTools.tsx +++ b/packages/live2d/src/components/Live2dTools.tsx @@ -4,20 +4,94 @@ import { createComponent } from "@lit/react"; import React from "react"; import { consume } from "@lit/context"; import { configContext, type Live2dConfig } from "../context/config-context"; -import { property } from "lit/decorators.js"; +import { property, state } from "lit/decorators.js"; +import type { Tool } from "../live2d/tools/tools"; +import { CustomTool } from "../live2d/tools/custom-tool"; +import presetTools from "../live2d/tools"; +import "iconify-icon"; export class Live2dTools extends UnoLitElement { @consume({ context: configContext }) @property({ attribute: false }) public config?: Live2dConfig; - constructor() { - super(); - console.log("Live2dTools constructor", this.config); - } + @state() + private _tools: Tool[] = []; render(): TemplateResult { - return html`
`; + return html`
+ ${this._tools.map(this.renderTool)} +
`; + } + + renderTool(tool: Tool): TemplateResult { + return html` tool.execute()} + > + + `; + } + + connectedCallback(): void { + super.connectedCallback(); + // 根据配置生成对应的工具 + this.initializeTools(); + } + + private initializeTools(): void { + // 获取预设工具 + const presetTools = this.getPresetTools(); + // 获取自定义工具 + const customTools = this.getCustomTools(); + // 合并所有工具,并按照 priority 排序 + const tools = [...presetTools, ...customTools].sort( + (a, b) => b.priority - a.priority + ); + this._tools.push(...tools); + } + + private getCustomTools(): Tool[] { + if (!this.config) { + return []; + } + const customTools = this.config?.customTools; + if (!customTools || customTools.length === 0) { + return []; + } + const mountTool: Tool[] = []; + for (const tool of customTools) { + const customTool = new CustomTool(this.config, tool); + mountTool.push(customTool); + } + return mountTool; + } + + // 获取预设工具 + private getPresetTools(): Tool[] { + if (!this.config) { + return []; + } + const mountTool: Tool[] = []; + const tools = this.config?.tools; + if (!tools || tools.length === 0) { + // 加载所有预设工具 + for (const Tool of presetTools) { + mountTool.push(new Tool(this.config)); + } + return mountTool; + } + + for (const toolName of tools) { + const ToolClass = presetTools.find((t) => t.name === toolName); + if (ToolClass) { + mountTool.push(new ToolClass(this.config)); + } + } + return mountTool; } } diff --git a/packages/live2d/src/components/Live2dWidget.tsx b/packages/live2d/src/components/Live2dWidget.tsx index 6fd1414..99a977b 100644 --- a/packages/live2d/src/components/Live2dWidget.tsx +++ b/packages/live2d/src/components/Live2dWidget.tsx @@ -12,48 +12,51 @@ import "./Live2dTools"; import { ToggleCanvasEvent } from "../events/toggle-canvas"; export class Live2dWidget extends UnoLitElement { - @consume({ context: configContext }) - @property({ attribute: false }) - public config?: Live2dConfig; - - @state() - private _isShow = false; - - render(): TemplateResult { - return html` - - ${this.renderLive2dWidget()} + @consume({ context: configContext }) + @property({ attribute: false }) + public config?: Live2dConfig; + + @state() + private _isShow = false; + + render(): TemplateResult { + return html` + + ${this.renderLive2dWidget()} `; - } - - renderLive2dTools() { - if (this.config?.isTools) { - return html``; - } - } - - renderLive2dWidget() { - if (this._isShow) { - return html`
+ } + + renderLive2dTools() { + if (this.config?.isTools) { + return html``; + } + } + + renderLive2dWidget() { + if (this._isShow) { + return html`
${this.renderLive2dTools()}
`; - } - } + } + } - handleToggleWidget(e: ToggleCanvasEvent) { - console.log(e); - this._isShow = e.detail.isShow; - } + handleToggleWidget(e: ToggleCanvasEvent) { + this._isShow = e.detail.isShow; + } } customElements.define("live2d-widget", Live2dWidget); export const Live2dWidgetComponent = createComponent({ - tagName: "live2d-widget", - elementClass: Live2dWidget, - react: React, + tagName: "live2d-widget", + elementClass: Live2dWidget, + react: React, }); diff --git a/packages/live2d/src/context/config-context.ts b/packages/live2d/src/context/config-context.ts index f75eb62..c6cec15 100644 --- a/packages/live2d/src/context/config-context.ts +++ b/packages/live2d/src/context/config-context.ts @@ -1,4 +1,5 @@ import { createContext } from '@lit/context'; +import { CustomToolConfig } from 'live2d/tools/custom-tool'; export interface ObjectAny extends Record { } @@ -40,6 +41,10 @@ export interface TipConfig { export interface Live2dToolsConfig { // 是否显示右侧工具栏 isTools?: boolean; + // 显示的预设工具 + tools?: string[]; + // 自定义工具 + customTools?: CustomToolConfig[]; // openai 图标 openaiIcon?: string; // 一言图标 diff --git a/packages/live2d/src/helpers/sendMessage.ts b/packages/live2d/src/helpers/sendMessage.ts index 72c2412..edc36b2 100644 --- a/packages/live2d/src/helpers/sendMessage.ts +++ b/packages/live2d/src/helpers/sendMessage.ts @@ -1,19 +1,18 @@ +import { SendMessageEvent } from "../events/send-message"; + /** * 向 Live2D 发送消息事件 - * @param text - * @param timeout - * @param priority + * @param text + * @param timeout + * @param priority */ -export function sendMessage(text: string | string[] | undefined, timeout = 3000, priority = 0) { +export function sendMessage( + text: string | string[] | undefined, + timeout = 3000, + priority = 0 +) { if (!text) { return; } - const event = new CustomEvent("live2d:send-message", { - detail: { - text, - timeout, - priority, - }, - }); - window.dispatchEvent(event); -} \ No newline at end of file + window.dispatchEvent(new SendMessageEvent({ text, timeout, priority })); +} diff --git a/packages/live2d/src/live2d/tools/ai-chat.ts b/packages/live2d/src/live2d/tools/ai-chat.ts index a239136..c7c3090 100644 --- a/packages/live2d/src/live2d/tools/ai-chat.ts +++ b/packages/live2d/src/live2d/tools/ai-chat.ts @@ -5,9 +5,7 @@ import { Tool } from "./tools"; * AI 聊天工具 */ export class AIChatTool extends Tool { - name() { - return "AIChat"; - } + priority = 100; icon() { const icon = this.getConfig().aiChatUrl; @@ -17,4 +15,4 @@ export class AIChatTool extends Tool { execute() { // TODO: 打开 AI 聊天 } -} \ No newline at end of file +} diff --git a/packages/live2d/src/live2d/tools/asteroids.ts b/packages/live2d/src/live2d/tools/asteroids.ts index d96a4b1..561150b 100644 --- a/packages/live2d/src/live2d/tools/asteroids.ts +++ b/packages/live2d/src/live2d/tools/asteroids.ts @@ -11,10 +11,7 @@ declare global { * 小宇宙小游戏工具 */ export class AsteroidsTool extends Tool { - name() { - return "Asteroids"; - } - + priority = 80; icon() { const icon = this.getConfig().asteroidsIcon; return isNotEmptyString(icon) ? icon : "ph-paper-plane-tilt-fill"; @@ -22,8 +19,8 @@ export class AsteroidsTool extends Tool { execute() { // @ts-ignore - import("@libs/asteroids.min.js").then((module) => { + import("../../libs/asteroids.min.js").then((module) => { new module.default(); }); } -} \ No newline at end of file +} diff --git a/packages/live2d/src/live2d/tools/custom-tool.ts b/packages/live2d/src/live2d/tools/custom-tool.ts index 41bf65f..94591ff 100644 --- a/packages/live2d/src/live2d/tools/custom-tool.ts +++ b/packages/live2d/src/live2d/tools/custom-tool.ts @@ -1,27 +1,32 @@ -import type { Live2dConfig } from "context/config-context"; -import { isNotEmptyString } from "utils/isString"; +import type { Live2dConfig } from "../../context/config-context"; +import { isNotEmptyString } from "../../utils/isString"; import { Tool } from "./tools"; -import { _getFullOrDefaultTips } from '../events/tip-events'; export type CustomToolConfig = { name: string; icon?: string; - execute: () => void; -} + priority?: number; + execute: ((config: Live2dConfig) => void) | string; +}; /** * 自定义工具 */ export class CustomTool extends Tool { + priority: number; _name: string; _icon?: string; - _execute: () => void; + _execute: ((config: Live2dConfig) => void) | string; - constructor(config: Live2dConfig, { name, icon, execute }: CustomToolConfig) { + constructor( + config: Live2dConfig, + { name, icon, execute, priority }: CustomToolConfig + ) { super(config); this._name = name; this._icon = icon; this._execute = execute; + this.priority = priority || 0; } name() { @@ -34,6 +39,15 @@ export class CustomTool extends Tool { } execute() { - this._execute.bind(this)(); + if (typeof this._execute === "string") { + const customClass = new Function(` + return class { + ${this._execute} + } + `)(); + new customClass().execute.bind(this)(this.getConfig()); + return; + } + this._execute.bind(this)(this.getConfig()); } -} \ No newline at end of file +} diff --git a/packages/live2d/src/live2d/tools/exit.ts b/packages/live2d/src/live2d/tools/exit.ts index 6bde45b..1c26186 100644 --- a/packages/live2d/src/live2d/tools/exit.ts +++ b/packages/live2d/src/live2d/tools/exit.ts @@ -1,15 +1,13 @@ -import { sendMessage } from "helpers/sendMessage"; -import { isNotEmptyString } from "@utils/isString"; +import { sendMessage } from "../../helpers/sendMessage"; +import { isNotEmptyString } from "../../utils/isString"; import { Tool } from "./tools"; -import { ToggleCanvasEvent } from "../events/toggle-canvas"; +import { ToggleCanvasEvent } from "../../events/toggle-canvas"; /** * 退出 Live2d 工具 */ export class ExitTool extends Tool { - name() { - return "ExitTool"; - } + priority = 10; icon() { const icon = this.getConfig().exitIcon; @@ -21,6 +19,6 @@ export class ExitTool extends Tool { setTimeout(() => { // 触发退出 Live2d 事件 window.dispatchEvent(new ToggleCanvasEvent({ isShow: false })); - }, 3000) + }, 3000); } -} \ No newline at end of file +} diff --git a/packages/live2d/src/live2d/tools/hitokoto.ts b/packages/live2d/src/live2d/tools/hitokoto.ts index 5ef04f8..c9dc296 100644 --- a/packages/live2d/src/live2d/tools/hitokoto.ts +++ b/packages/live2d/src/live2d/tools/hitokoto.ts @@ -6,15 +6,13 @@ import { sendMessage } from "../../helpers/sendMessage"; /** * 一言工具,使用一言接口获取一句话 * 如需使用自定义的接口,则需要满足 hitokoto 的接口规范。 - * + * * @link https://developer.hitokoto.cn/sentence/demo.html */ export class HitokotoTool extends Tool { - _default_api = "https://v1.hitokoto.cn"; + priority = 90; - name() { - return "Hitokoto"; - } + _default_api = "https://v1.hitokoto.cn"; icon() { const icon = this.getConfig().aiChatUrl; @@ -22,7 +20,7 @@ export class HitokotoTool extends Tool { } async execute() { - const { hitokoto, description } = await this._getHitokotoMessage() || {}; + const { hitokoto, description } = (await this._getHitokotoMessage()) || {}; if (isNotEmptyString(hitokoto)) { sendMessage(hitokoto, 6000, 2); setTimeout(() => { @@ -31,7 +29,9 @@ export class HitokotoTool extends Tool { } } - private async _getHitokotoMessage(): Promise<{ hitokoto: string, description: string } | undefined> { + private async _getHitokotoMessage(): Promise< + { hitokoto: string; description: string } | undefined + > { const unverifiedApi = this.getConfig().hitokotoApi || this._default_api; const parsedApi = queryString.parseUrl(unverifiedApi); const newParams = { ...parsedApi.query, encode: "json", charset: "utf-8" }; @@ -40,14 +40,14 @@ export class HitokotoTool extends Tool { if (isNotEmptyString(hitokoto)) { return { hitokoto: "hitokoto", - description: `这句一言来自 「${from}」,是 ${creator} 在 hitokoto.cn 投稿的。` - } + description: `这句一言来自 「${from}」,是 ${creator} 在 hitokoto.cn 投稿的。`, + }; } } private _fetchHitokoto(hitokotoApi: string): Promise { return fetch(hitokotoApi) - .then(res => res.json()) + .then((res) => res.json()) .then((result: HitokotoResult) => { return result; }); @@ -70,4 +70,4 @@ export type HitokotoResult = { commit_from?: string; created_at?: string; length?: number; -} \ No newline at end of file +}; diff --git a/packages/live2d/src/live2d/tools/index.ts b/packages/live2d/src/live2d/tools/index.ts new file mode 100644 index 0000000..32ba4a3 --- /dev/null +++ b/packages/live2d/src/live2d/tools/index.ts @@ -0,0 +1,25 @@ +import type { Live2dConfig } from "../../context/config-context"; +import { AIChatTool } from "./ai-chat"; +import { AsteroidsTool } from "./asteroids"; +import { ExitTool } from "./exit"; +import { HitokotoTool } from "./hitokoto"; +import { InfoTool } from "./info"; +import { ScreenshotTool } from "./screenshot"; +import { SwitchModelTool } from "./switch-model"; +import { SwitchTextureTool } from "./switch-texture"; +import type { Tool } from "./tools"; + +export type ToolConstructor = new (config: Live2dConfig) => Tool; + +export const presetTools: ToolConstructor[] = [ + AsteroidsTool, + AIChatTool, + HitokotoTool, + ExitTool, + InfoTool, + ScreenshotTool, + SwitchModelTool, + SwitchTextureTool, +]; + +export default presetTools; diff --git a/packages/live2d/src/live2d/tools/info.ts b/packages/live2d/src/live2d/tools/info.ts index 8629ca4..6ea0a9e 100644 --- a/packages/live2d/src/live2d/tools/info.ts +++ b/packages/live2d/src/live2d/tools/info.ts @@ -5,17 +5,16 @@ import { Tool } from "./tools"; * 前往站点工具 */ export class InfoTool extends Tool { - name() { - return "InfoTool"; - } - + priority = 40; + icon() { const icon = this.getConfig().infoIcon; return isNotEmptyString(icon) ? icon : "ph-info-fill"; } execute() { - const siteUrl = this.getConfig().infoSite || "https://github.com/LIlGG/plugin-live2d"; + const siteUrl = + this.getConfig().infoSite || "https://github.com/LIlGG/plugin-live2d"; window.open(siteUrl); } -} \ No newline at end of file +} diff --git a/packages/live2d/src/live2d/tools/screenshot.ts b/packages/live2d/src/live2d/tools/screenshot.ts index 8d9ccb9..f8174b6 100644 --- a/packages/live2d/src/live2d/tools/screenshot.ts +++ b/packages/live2d/src/live2d/tools/screenshot.ts @@ -1,4 +1,4 @@ -import { sendMessage } from "helpers/sendMessage"; +import { sendMessage } from "../../helpers/sendMessage"; import { isNotEmptyString } from "../../utils/isString"; import { Tool } from "./tools"; @@ -11,19 +11,17 @@ declare const Live2D: { * 截图工具 */ export class ScreenshotTool extends Tool { - name() { - return "Screenshot"; - } + priority = 50; icon() { const icon = this.getConfig().screenshotIcon; - return isNotEmptyString(icon) ? icon : "ph-arrows-counter-clockwise-fill"; + return isNotEmptyString(icon) ? icon : "ph-camera-fill"; } execute() { sendMessage("照好了嘛,是不是很可爱呢?", 6000, 2); - const screenshotName = this.getConfig().screenshotName || 'live2d'; + const screenshotName = this.getConfig().screenshotName || "live2d"; Live2D.captureName = `${screenshotName}.png`; Live2D.captureFrame = true; } -} \ No newline at end of file +} diff --git a/packages/live2d/src/live2d/tools/switch-model.ts b/packages/live2d/src/live2d/tools/switch-model.ts index 52cc0f2..23fdabe 100644 --- a/packages/live2d/src/live2d/tools/switch-model.ts +++ b/packages/live2d/src/live2d/tools/switch-model.ts @@ -5,9 +5,7 @@ import { Tool } from "./tools"; * 切换模型工具 */ export class SwitchModelTool extends Tool { - name() { - return "SwitchModel"; - } + priority = 70; icon() { const icon = this.getConfig().switchModelIcon; @@ -17,4 +15,4 @@ export class SwitchModelTool extends Tool { execute() { console.log("Model switch event emitted."); } -} \ No newline at end of file +} diff --git a/packages/live2d/src/live2d/tools/switch-texture.ts b/packages/live2d/src/live2d/tools/switch-texture.ts index a54b70d..05cc176 100644 --- a/packages/live2d/src/live2d/tools/switch-texture.ts +++ b/packages/live2d/src/live2d/tools/switch-texture.ts @@ -5,16 +5,14 @@ import { Tool } from "./tools"; * 切换纹理工具 */ export class SwitchTextureTool extends Tool { - name() { - return "SwitchTexture"; - } + priority = 60; icon() { const icon = this.getConfig().switchTextureIcon; - return isNotEmptyString(icon) ? icon : "ph-camera-fill"; + return isNotEmptyString(icon) ? icon : "ph-arrows-counter-clockwise-fill"; } execute() { // 发出切换模型的事件 } -} \ No newline at end of file +} diff --git a/packages/live2d/src/live2d/tools/tools.ts b/packages/live2d/src/live2d/tools/tools.ts index 40cb404..89ba292 100644 --- a/packages/live2d/src/live2d/tools/tools.ts +++ b/packages/live2d/src/live2d/tools/tools.ts @@ -2,12 +2,18 @@ import type { Live2dConfig } from "../../context/config-context"; export abstract class Tool { private _config: Live2dConfig; + /** + * 优先级, 数字越大越靠前 + */ + abstract priority: number; constructor(config: Live2dConfig) { this._config = config; } - abstract name(): string; + name(): string { + return this.constructor.name; + } abstract icon(): string; @@ -16,4 +22,4 @@ export abstract class Tool { protected getConfig(): Live2dConfig { return this._config; } -} \ No newline at end of file +} diff --git a/packages/live2d/tsconfig.json b/packages/live2d/tsconfig.json index 3107442..29206d7 100644 --- a/packages/live2d/tsconfig.json +++ b/packages/live2d/tsconfig.json @@ -25,12 +25,7 @@ { "name": "ts-lit-plugin" } - ], - "baseUrl": "./src", - "paths": { - "@libs/*": ["libs/*"], - "@utils/*": ["utils/*"], - } + ] }, - "include": ["src"] + "include": ["src/**/*"] } diff --git a/packages/live2d/tsconfig.tsbuildinfo b/packages/live2d/tsconfig.tsbuildinfo index da9ec8e..7049d32 100644 --- a/packages/live2d/tsconfig.tsbuildinfo +++ b/packages/live2d/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"root":["./src/demo.tsx","./src/env.d.ts","./src/index.ts","./src/common/unolitelement.ts","./src/components/live2dtoggle.tsx","./src/events/index.ts","./src/styles/unocss.global.css.d.ts","./src/util/unomixin.ts"],"version":"5.7.3"} \ No newline at end of file +{"root":["./src/demo.tsx","./src/env.d.ts","./src/index.ts","./src/common/unolitelement.ts","./src/components/live2dcanvas.tsx","./src/components/live2dcontext.tsx","./src/components/live2dtips.tsx","./src/components/live2dtoggle.tsx","./src/components/live2dtools.tsx","./src/components/live2dwidget.tsx","./src/context/config-context.ts","./src/events/add-default-message.ts","./src/events/before-init.ts","./src/events/index.ts","./src/events/send-message.ts","./src/events/tip-events.ts","./src/events/toggle-canvas.ts","./src/events/types.ts","./src/helpers/datewithinrange.ts","./src/helpers/getplugintips.ts","./src/helpers/loadtipsresource.ts","./src/helpers/mergetips.ts","./src/helpers/sendmessage.ts","./src/helpers/timewithinrange.ts","./src/live2d/model.ts","./src/live2d/tools/ai-chat.ts","./src/live2d/tools/asteroids.ts","./src/live2d/tools/custom-tool.ts","./src/live2d/tools/exit.ts","./src/live2d/tools/hitokoto.ts","./src/live2d/tools/index.ts","./src/live2d/tools/info.ts","./src/live2d/tools/screenshot.ts","./src/live2d/tools/switch-model.ts","./src/live2d/tools/switch-texture.ts","./src/live2d/tools/tools.ts","./src/styles/unocss.global.css.d.ts","./src/utils/distinctarray.ts","./src/utils/isnotempty.ts","./src/utils/isstring.ts","./src/utils/randomselection.ts","./src/utils/unomixin.ts","./src/utils/util.ts"],"errors":true,"version":"5.7.3"} \ No newline at end of file diff --git a/packages/live2d/vite.config.ts b/packages/live2d/vite.config.ts index 896637b..1f816ed 100644 --- a/packages/live2d/vite.config.ts +++ b/packages/live2d/vite.config.ts @@ -1,24 +1,32 @@ -import { defineConfig } from 'vite' -import { resolve } from 'node:path' -import react from '@vitejs/plugin-react' +import { defineConfig } from "vite"; +import { resolve } from "node:path"; +import react from "@vitejs/plugin-react"; export default defineConfig({ - plugins: [react({ - babel: { - parserOpts: { - plugins: ['decorators-legacy'], + plugins: [ + react({ + babel: { + parserOpts: { + plugins: ["decorators-legacy"], + }, }, - }, - })], + }), + ], build: { lib: { - entry: resolve(__dirname, 'src/index.ts'), - name: 'Live2d', - fileName: 'live2d', + entry: resolve(__dirname, "src/index.ts"), + name: "Live2d", + fileName: "live2d", }, rollupOptions: { - external: ['react', 'react-dom'], + external: ["react", "react-dom"], + }, + }, + + server: { + fs: { + strict: false } } -}) +}); From e319113371e741da6b7ca2216a628d7f99efc15f Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Sat, 1 Mar 2025 11:05:17 +0800 Subject: [PATCH 11/12] feat: add Cubism2 and Cubism4 as rendering engines --- packages/live2d/package.json | 2 + .../live2d/src/components/Live2dCanvas.tsx | 65 +- .../live2d/src/components/Live2dContext.tsx | 28 +- packages/live2d/src/libs/live2d.min.js | 8121 +---------------- .../live2d/src/libs/live2dcubismcore.min.js | 9 + packages/live2d/src/live2d/model.ts | 59 +- packages/live2d/tsconfig.json | 3 +- pnpm-lock.yaml | 1072 ++- 8 files changed, 1173 insertions(+), 8186 deletions(-) create mode 100644 packages/live2d/src/libs/live2dcubismcore.min.js diff --git a/packages/live2d/package.json b/packages/live2d/package.json index 0c484a4..25b6a73 100644 --- a/packages/live2d/package.json +++ b/packages/live2d/package.json @@ -24,6 +24,8 @@ "@lit/react": "^1.0.7", "iconify-icon": "^2.3.0", "lit": "^3.2.1", + "pixi-live2d-display": "^0.4.0", + "pixi.js": "^6.5.2", "query-string": "^9.1.1", "react": "^19.0.0", "react-dom": "^19.0.0" diff --git a/packages/live2d/src/components/Live2dCanvas.tsx b/packages/live2d/src/components/Live2dCanvas.tsx index bfacf06..99ad580 100644 --- a/packages/live2d/src/components/Live2dCanvas.tsx +++ b/packages/live2d/src/components/Live2dCanvas.tsx @@ -6,46 +6,49 @@ import { property, query, state } from "lit/decorators.js"; import Model from "../live2d/model"; import { consume } from "@lit/context"; import { configContext, type Live2dConfig } from "../context/config-context"; -import "../libs/live2d.min.js"; import { BeforeInitEvent } from "../events/before-init.js"; export class Live2dCanvas extends UnoLitElement { - @consume({ context: configContext }) - @property({ attribute: false }) - public config?: Live2dConfig; - - @state() - private _model: unknown; - - @query("#live2d") - private _live2d; - - render(): TemplateResult { - return html` - - - + @consume({ context: configContext }) + @property({ attribute: false }) + public config?: Live2dConfig; + + @state() + private _model: unknown; + + @query("#live2d") + private _live2d; + + render(): TemplateResult { + return html` + + `; - } + } - connectedCallback(): void { - super.connectedCallback(); - // 发出 Live2d beforeInit 事件 + connectedCallback(): void { + super.connectedCallback(); + // 发出 Live2d beforeInit 事件 window.dispatchEvent(new BeforeInitEvent({ config: this.config })); - } - - protected firstUpdated(_changedProperties: PropertyValues): void { - super.firstUpdated(_changedProperties); - if (this.config && this._live2d) { - this._model = new Model(this._live2d, this.config); - } - } + } + + protected firstUpdated(_changedProperties: PropertyValues): void { + super.firstUpdated(_changedProperties); + if (this.config && this._live2d) { + this._model = new Model(this._live2d, this.config); + } + } } customElements.define("live2d-canvas", Live2dCanvas); export const Live2dCanvasComponent = createComponent({ - tagName: "live2d-canvas", - elementClass: Live2dCanvas, - react: React, + tagName: "live2d-canvas", + elementClass: Live2dCanvas, + react: React, }); diff --git a/packages/live2d/src/components/Live2dContext.tsx b/packages/live2d/src/components/Live2dContext.tsx index bb45232..9ddaaa3 100644 --- a/packages/live2d/src/components/Live2dContext.tsx +++ b/packages/live2d/src/components/Live2dContext.tsx @@ -8,25 +8,23 @@ import { configContext, type Live2dConfig } from "../context/config-context"; import "../events"; export class Live2dContext extends UnoLitElement { - @provide({ context: configContext }) - config = { - apiPath: "https://live2d.fghrsh.net/api", - live2dLocation: "right", - consoleShowStatus: false, - isTools: true, - } as Live2dConfig; + @provide({ context: configContext }) + config = { + apiPath: "https://live2d.fghrsh.net/api", + live2dLocation: "right", + consoleShowStatus: false, + isTools: true, + } as Live2dConfig; - render(): TemplateResult { - return html` - - `; - } + render(): TemplateResult { + return html` `; + } } customElements.define("live2d-context", Live2dContext); export const Live2dContextComponent = createComponent({ - tagName: "live2d-context", - elementClass: Live2dContext, - react: React, + tagName: "live2d-context", + elementClass: Live2dContext, + react: React, }); diff --git a/packages/live2d/src/libs/live2d.min.js b/packages/live2d/src/libs/live2d.min.js index 156325a..c3ed3bc 100644 --- a/packages/live2d/src/libs/live2d.min.js +++ b/packages/live2d/src/libs/live2d.min.js @@ -1,8121 +1,2 @@ -!(function (t) { - function i(r) { - if (e[r]) return e[r].exports; - var o = (e[r] = { i: r, l: !1, exports: {} }); - return t[r].call(o.exports, o, o.exports, i), (o.l = !0), o.exports; - } - var e = {}; - (i.m = t), - (i.c = e), - (i.d = function (t, e, r) { - i.o(t, e) || - Object.defineProperty(t, e, { - configurable: !1, - enumerable: !0, - get: r, - }); - }), - (i.n = function (t) { - var e = - t && t.__esModule - ? function () { - return t.default; - } - : function () { - return t; - }; - return i.d(e, "a", e), e; - }), - (i.o = function (t, i) { - return Object.prototype.hasOwnProperty.call(t, i); - }), - (i.p = ""), - i((i.s = 4)); -})([ - function (t, i, e) { - "use strict"; - function r() { - (this.live2DModel = null), - (this.modelMatrix = null), - (this.eyeBlink = null), - (this.physics = null), - (this.pose = null), - (this.debugMode = !1), - (this.initialized = !1), - (this.updating = !1), - (this.alpha = 1), - (this.accAlpha = 0), - (this.lipSync = !1), - (this.lipSyncValue = 0), - (this.accelX = 0), - (this.accelY = 0), - (this.accelZ = 0), - (this.dragX = 0), - (this.dragY = 0), - (this.startTimeMSec = null), - (this.mainMotionManager = new h()), - (this.expressionManager = new h()), - (this.motions = {}), - (this.expressions = {}), - (this.isTexLoaded = !1); - } - function o() { - AMotion.prototype.constructor.call(this), (this.paramList = new Array()); - } - function n() { - (this.id = ""), (this.type = -1), (this.value = null); - } - function s() { - (this.nextBlinkTime = null), - (this.stateStartTime = null), - (this.blinkIntervalMsec = null), - (this.eyeState = g.STATE_FIRST), - (this.blinkIntervalMsec = 4e3), - (this.closingMotionMsec = 100), - (this.closedMotionMsec = 50), - (this.openingMotionMsec = 150), - (this.closeIfZero = !0), - (this.eyeID_L = "PARAM_EYE_L_OPEN"), - (this.eyeID_R = "PARAM_EYE_R_OPEN"); - } - function _() { - (this.tr = new Float32Array(16)), this.identity(); - } - function a(t, i) { - _.prototype.constructor.call(this), (this.width = t), (this.height = i); - } - function h() { - MotionQueueManager.prototype.constructor.call(this), - (this.currentPriority = null), - (this.reservePriority = null), - (this.super = MotionQueueManager.prototype); - } - function l() { - (this.physicsList = new Array()), - (this.startTimeMSec = UtSystem.getUserTimeMSec()); - } - function $() { - (this.lastTime = 0), - (this.lastModel = null), - (this.partsGroups = new Array()); - } - function u(t) { - (this.paramIndex = -1), - (this.partsIndex = -1), - (this.link = null), - (this.id = t); - } - function p() { - (this.EPSILON = 0.01), - (this.faceTargetX = 0), - (this.faceTargetY = 0), - (this.faceX = 0), - (this.faceY = 0), - (this.faceVX = 0), - (this.faceVY = 0), - (this.lastTimeSec = 0); - } - function f() { - _.prototype.constructor.call(this), - (this.screenLeft = null), - (this.screenRight = null), - (this.screenTop = null), - (this.screenBottom = null), - (this.maxLeft = null), - (this.maxRight = null), - (this.maxTop = null), - (this.maxBottom = null), - (this.max = Number.MAX_VALUE), - (this.min = 0); - } - function c() {} - var d = 0; - (r.prototype.getModelMatrix = function () { - return this.modelMatrix; - }), - (r.prototype.setAlpha = function (t) { - t > 0.999 && (t = 1), t < 0.001 && (t = 0), (this.alpha = t); - }), - (r.prototype.getAlpha = function () { - return this.alpha; - }), - (r.prototype.isInitialized = function () { - return this.initialized; - }), - (r.prototype.setInitialized = function (t) { - this.initialized = t; - }), - (r.prototype.isUpdating = function () { - return this.updating; - }), - (r.prototype.setUpdating = function (t) { - this.updating = t; - }), - (r.prototype.getLive2DModel = function () { - return this.live2DModel; - }), - (r.prototype.setLipSync = function (t) { - this.lipSync = t; - }), - (r.prototype.setLipSyncValue = function (t) { - this.lipSyncValue = t; - }), - (r.prototype.setAccel = function (t, i, e) { - (this.accelX = t), (this.accelY = i), (this.accelZ = e); - }), - (r.prototype.setDrag = function (t, i) { - (this.dragX = t), (this.dragY = i); - }), - (r.prototype.getMainMotionManager = function () { - return this.mainMotionManager; - }), - (r.prototype.getExpressionManager = function () { - return this.expressionManager; - }), - (r.prototype.loadModelData = function (t, i) { - var e = c.getPlatformManager(); - this.debugMode && e.log("Load model : " + t); - var r = this; - e.loadLive2DModel(t, function (t) { - if ( - ((r.live2DModel = t), - r.live2DModel.saveParam(), - 0 != Live2D.getError()) - ) - return void console.error("Error : Failed to loadModelData()."); - (r.modelMatrix = new a( - r.live2DModel.getCanvasWidth(), - r.live2DModel.getCanvasHeight() - )), - r.modelMatrix.setWidth(2), - r.modelMatrix.setCenterPosition(0, 0), - i(r.live2DModel); - }); - }), - (r.prototype.loadTexture = function (t, i, e) { - d++; - var r = c.getPlatformManager(); - this.debugMode && r.log("Load Texture : " + i); - var o = this; - r.loadTexture(this.live2DModel, t, i, function () { - d--, 0 == d && (o.isTexLoaded = !0), "function" == typeof e && e(); - }); - }), - (r.prototype.loadMotion = function (t, i, e) { - var r = c.getPlatformManager(); - this.debugMode && r.log("Load Motion : " + i); - var o = null, - n = this; - r.loadBytes(i, function (i) { - (o = Live2DMotion.loadMotion(i)), - null != t && (n.motions[t] = o), - e(o); - }); - }), - (r.prototype.loadExpression = function (t, i, e) { - var r = c.getPlatformManager(); - this.debugMode && r.log("Load Expression : " + i); - var n = this; - r.loadBytes(i, function (i) { - null != t && (n.expressions[t] = o.loadJson(i)), - "function" == typeof e && e(); - }); - }), - (r.prototype.loadPose = function (t, i) { - var e = c.getPlatformManager(); - this.debugMode && e.log("Load Pose : " + t); - var r = this; - try { - e.loadBytes(t, function (t) { - (r.pose = $.load(t)), "function" == typeof i && i(); - }); - } catch (t) { - console.warn(t); - } - }), - (r.prototype.loadPhysics = function (t) { - var i = c.getPlatformManager(); - this.debugMode && i.log("Load Physics : " + t); - var e = this; - try { - i.loadBytes(t, function (t) { - e.physics = l.load(t); - }); - } catch (t) { - console.warn(t); - } - }), - (r.prototype.hitTestSimple = function (t, i, e) { - if (null === this.live2DModel) return !1; - var r = this.live2DModel.getDrawDataIndex(t); - if (r < 0) return !1; - for ( - var o = this.live2DModel.getTransformedPoints(r), - n = this.live2DModel.getCanvasWidth(), - s = 0, - _ = this.live2DModel.getCanvasHeight(), - a = 0, - h = 0; - h < o.length; - h += 2 - ) { - var l = o[h], - $ = o[h + 1]; - l < n && (n = l), - l > s && (s = l), - $ < _ && (_ = $), - $ > a && (a = $); - } - var u = this.modelMatrix.invertTransformX(i), - p = this.modelMatrix.invertTransformY(e); - return n <= u && u <= s && _ <= p && p <= a; - }), - (r.prototype.hitTestSimpleCustom = function (t, i, e, r) { - return ( - null !== this.live2DModel && - e >= t[0] && - e <= i[0] && - r <= t[1] && - r >= i[1] - ); - }), - (o.prototype = new AMotion()), - (o.EXPRESSION_DEFAULT = "DEFAULT"), - (o.TYPE_SET = 0), - (o.TYPE_ADD = 1), - (o.TYPE_MULT = 2), - (o.loadJson = function (t) { - var i = new o(), - e = c.getPlatformManager(), - r = e.jsonParseFromBytes(t); - if ( - (i.setFadeIn(parseInt(r.fade_in) > 0 ? parseInt(r.fade_in) : 1e3), - i.setFadeOut(parseInt(r.fade_out) > 0 ? parseInt(r.fade_out) : 1e3), - null == r.params) - ) - return i; - var s = r.params, - _ = s.length; - i.paramList = []; - for (var a = 0; a < _; a++) { - var h = s[a], - l = h.id.toString(), - $ = parseFloat(h.val), - u = o.TYPE_ADD, - p = null != h.calc ? h.calc.toString() : "add"; - if ( - (u = - "add" === p - ? o.TYPE_ADD - : "mult" === p - ? o.TYPE_MULT - : "set" === p - ? o.TYPE_SET - : o.TYPE_ADD) == o.TYPE_ADD - ) { - var f = null == h.def ? 0 : parseFloat(h.def); - $ -= f; - } else if (u == o.TYPE_MULT) { - var f = null == h.def ? 1 : parseFloat(h.def); - 0 == f && (f = 1), ($ /= f); - } - var d = new n(); - (d.id = l), (d.type = u), (d.value = $), i.paramList.push(d); - } - return i; - }), - (o.prototype.updateParamExe = function (t, i, e, r) { - for (var n = this.paramList.length - 1; n >= 0; --n) { - var s = this.paramList[n]; - s.type == o.TYPE_ADD - ? t.addToParamFloat(s.id, s.value, e) - : s.type == o.TYPE_MULT - ? t.multParamFloat(s.id, s.value, e) - : s.type == o.TYPE_SET && t.setParamFloat(s.id, s.value, e); - } - }), - (s.prototype.calcNextBlink = function () { - return ( - UtSystem.getUserTimeMSec() + - Math.random() * (2 * this.blinkIntervalMsec - 1) - ); - }), - (s.prototype.setInterval = function (t) { - this.blinkIntervalMsec = t; - }), - (s.prototype.setEyeMotion = function (t, i, e) { - (this.closingMotionMsec = t), - (this.closedMotionMsec = i), - (this.openingMotionMsec = e); - }), - (s.prototype.updateParam = function (t) { - var i, - e = UtSystem.getUserTimeMSec(), - r = 0; - switch (this.eyeState) { - case g.STATE_CLOSING: - (r = (e - this.stateStartTime) / this.closingMotionMsec), - r >= 1 && - ((r = 1), - (this.eyeState = g.STATE_CLOSED), - (this.stateStartTime = e)), - (i = 1 - r); - break; - case g.STATE_CLOSED: - (r = (e - this.stateStartTime) / this.closedMotionMsec), - r >= 1 && - ((this.eyeState = g.STATE_OPENING), (this.stateStartTime = e)), - (i = 0); - break; - case g.STATE_OPENING: - (r = (e - this.stateStartTime) / this.openingMotionMsec), - r >= 1 && - ((r = 1), - (this.eyeState = g.STATE_INTERVAL), - (this.nextBlinkTime = this.calcNextBlink())), - (i = r); - break; - case g.STATE_INTERVAL: - this.nextBlinkTime < e && - ((this.eyeState = g.STATE_CLOSING), (this.stateStartTime = e)), - (i = 1); - break; - case g.STATE_FIRST: - default: - (this.eyeState = g.STATE_INTERVAL), - (this.nextBlinkTime = this.calcNextBlink()), - (i = 1); - } - this.closeIfZero || (i = -i), - t.setParamFloat(this.eyeID_L, i), - t.setParamFloat(this.eyeID_R, i); - }); - var g = function () {}; - (g.STATE_FIRST = "STATE_FIRST"), - (g.STATE_INTERVAL = "STATE_INTERVAL"), - (g.STATE_CLOSING = "STATE_CLOSING"), - (g.STATE_CLOSED = "STATE_CLOSED"), - (g.STATE_OPENING = "STATE_OPENING"), - (_.mul = function (t, i, e) { - var r, - o, - n, - s = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - for (r = 0; r < 4; r++) - for (o = 0; o < 4; o++) - for (n = 0; n < 4; n++) s[r + 4 * o] += t[r + 4 * n] * i[n + 4 * o]; - for (r = 0; r < 16; r++) e[r] = s[r]; - }), - (_.prototype.identity = function () { - for (var t = 0; t < 16; t++) this.tr[t] = t % 5 == 0 ? 1 : 0; - }), - (_.prototype.getArray = function () { - return this.tr; - }), - (_.prototype.getCopyMatrix = function () { - return new Float32Array(this.tr); - }), - (_.prototype.setMatrix = function (t) { - if (null != this.tr && this.tr.length == this.tr.length) - for (var i = 0; i < 16; i++) this.tr[i] = t[i]; - }), - (_.prototype.getScaleX = function () { - return this.tr[0]; - }), - (_.prototype.getScaleY = function () { - return this.tr[5]; - }), - (_.prototype.transformX = function (t) { - return (this.tr[0] * t * 8) / 3 + this.tr[12]; - }), - (_.prototype.transformY = function (t) { - return (this.tr[5] * t * 8) / 3 + this.tr[13]; - }), - (_.prototype.invertTransformX = function (t) { - return (t - this.tr[12]) / this.tr[0]; - }), - (_.prototype.invertTransformY = function (t) { - return (t - this.tr[13]) / this.tr[5]; - }), - (_.prototype.multTranslate = function (t, i) { - var e = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, t, i, 0, 1]; - _.mul(e, this.tr, this.tr); - }), - (_.prototype.translate = function (t, i) { - (this.tr[12] = t), (this.tr[13] = i); - }), - (_.prototype.translateX = function (t) { - this.tr[12] = t; - }), - (_.prototype.translateY = function (t) { - this.tr[13] = t; - }), - (_.prototype.multScale = function (t, i) { - var e = [t, 0, 0, 0, 0, i, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]; - _.mul(e, this.tr, this.tr); - }), - (_.prototype.scale = function (t, i) { - (this.tr[0] = t), (this.tr[5] = i); - }), - (a.prototype = new _()), - (a.prototype.setPosition = function (t, i) { - this.translate(t, i); - }), - (a.prototype.setCenterPosition = function (t, i) { - var e = this.width * this.getScaleX(), - r = this.height * this.getScaleY(); - this.translate(t - e / 2, i - r / 2); - }), - (a.prototype.top = function (t) { - this.setY(t); - }), - (a.prototype.bottom = function (t) { - var i = this.height * this.getScaleY(); - this.translateY(t - i); - }), - (a.prototype.left = function (t) { - this.setX(t); - }), - (a.prototype.right = function (t) { - var i = this.width * this.getScaleX(); - this.translateX(t - i); - }), - (a.prototype.centerX = function (t) { - var i = this.width * this.getScaleX(); - this.translateX(t - i / 2); - }), - (a.prototype.centerY = function (t) { - var i = this.height * this.getScaleY(); - this.translateY(t - i / 2); - }), - (a.prototype.setX = function (t) { - this.translateX(t); - }), - (a.prototype.setY = function (t) { - this.translateY(t); - }), - (a.prototype.setHeight = function (t) { - var i = t / this.height, - e = -i; - this.scale(i, e); - }), - (a.prototype.setWidth = function (t) { - var i = t / this.width, - e = -i; - this.scale(i, e); - }), - (h.prototype = new MotionQueueManager()), - (h.prototype.getCurrentPriority = function () { - return this.currentPriority; - }), - (h.prototype.getReservePriority = function () { - return this.reservePriority; - }), - (h.prototype.reserveMotion = function (t) { - return ( - !(this.reservePriority >= t) && - !(this.currentPriority >= t) && - ((this.reservePriority = t), !0) - ); - }), - (h.prototype.setReservePriority = function (t) { - this.reservePriority = t; - }), - (h.prototype.updateParam = function (t) { - var i = MotionQueueManager.prototype.updateParam.call(this, t); - return this.isFinished() && (this.currentPriority = 0), i; - }), - (h.prototype.startMotionPrio = function (t, i) { - return ( - i == this.reservePriority && (this.reservePriority = 0), - (this.currentPriority = i), - this.startMotion(t, !1) - ); - }), - (l.load = function (t) { - for ( - var i = new l(), - e = c.getPlatformManager(), - r = e.jsonParseFromBytes(t), - o = r.physics_hair, - n = o.length, - s = 0; - s < n; - s++ - ) { - var _ = o[s], - a = new PhysicsHair(), - h = _.setup, - $ = parseFloat(h.length), - u = parseFloat(h.regist), - p = parseFloat(h.mass); - a.setup($, u, p); - for (var f = _.src, d = f.length, g = 0; g < d; g++) { - var y = f[g], - m = y.id, - T = PhysicsHair.Src.SRC_TO_X, - P = y.ptype; - "x" === P - ? (T = PhysicsHair.Src.SRC_TO_X) - : "y" === P - ? (T = PhysicsHair.Src.SRC_TO_Y) - : "angle" === P - ? (T = PhysicsHair.Src.SRC_TO_G_ANGLE) - : UtDebug.error("live2d", "Invalid parameter:PhysicsHair.Src"); - var S = parseFloat(y.scale), - v = parseFloat(y.weight); - a.addSrcParam(T, m, S, v); - } - for (var L = _.targets, M = L.length, g = 0; g < M; g++) { - var E = L[g], - m = E.id, - T = PhysicsHair.Target.TARGET_FROM_ANGLE, - P = E.ptype; - "angle" === P - ? (T = PhysicsHair.Target.TARGET_FROM_ANGLE) - : "angle_v" === P - ? (T = PhysicsHair.Target.TARGET_FROM_ANGLE_V) - : UtDebug.error("live2d", "Invalid parameter:PhysicsHair.Target"); - var S = parseFloat(E.scale), - v = parseFloat(E.weight); - a.addTargetParam(T, m, S, v); - } - i.physicsList.push(a); - } - return i; - }), - (l.prototype.updateParam = function (t) { - for ( - var i = UtSystem.getUserTimeMSec() - this.startTimeMSec, e = 0; - e < this.physicsList.length; - e++ - ) - this.physicsList[e].update(t, i); - }), - ($.load = function (t) { - for ( - var i = new $(), - e = c.getPlatformManager(), - r = e.jsonParseFromBytes(t), - o = r.parts_visible, - n = o.length, - s = 0; - s < n; - s++ - ) { - for ( - var _ = o[s], a = _.group, h = a.length, l = new Array(), p = 0; - p < h; - p++ - ) { - var f = a[p], - d = new u(f.id); - if (((l[p] = d), null != f.link)) { - var g = f.link, - y = g.length; - d.link = new Array(); - for (var m = 0; m < y; m++) { - var T = new u(g[m]); - d.link.push(T); - } - } - } - i.partsGroups.push(l); - } - return i; - }), - ($.prototype.updateParam = function (t) { - if (null != t) { - t != this.lastModel && this.initParam(t), (this.lastModel = t); - var i = UtSystem.getUserTimeMSec(), - e = 0 == this.lastTime ? 0 : (i - this.lastTime) / 1e3; - (this.lastTime = i), e < 0 && (e = 0); - for (var r = 0; r < this.partsGroups.length; r++) - this.normalizePartsOpacityGroup(t, this.partsGroups[r], e), - this.copyOpacityOtherParts(t, this.partsGroups[r]); - } - }), - ($.prototype.initParam = function (t) { - if (null != t) - for (var i = 0; i < this.partsGroups.length; i++) - for (var e = this.partsGroups[i], r = 0; r < e.length; r++) { - e[r].initIndex(t); - var o = e[r].partsIndex, - n = e[r].paramIndex; - if (!(o < 0)) { - var s = 0 != t.getParamFloat(n); - if ( - (t.setPartsOpacity(o, s ? 1 : 0), - t.setParamFloat(n, s ? 1 : 0), - null != e[r].link) - ) - for (var _ = 0; _ < e[r].link.length; _++) - e[r].link[_].initIndex(t); - } - } - }), - ($.prototype.normalizePartsOpacityGroup = function (t, i, e) { - for (var r = -1, o = 1, n = 0; n < i.length; n++) { - var s = i[n].partsIndex, - _ = i[n].paramIndex; - if (!(s < 0) && 0 != t.getParamFloat(_)) { - if (r >= 0) break; - (r = n), - (o = t.getPartsOpacity(s)), - (o += e / 0.5), - o > 1 && (o = 1); - } - } - r < 0 && ((r = 0), (o = 1)); - for (var n = 0; n < i.length; n++) { - var s = i[n].partsIndex; - if (!(s < 0)) - if (r == n) t.setPartsOpacity(s, o); - else { - var a, - h = t.getPartsOpacity(s); - a = o < 0.5 ? (-0.5 * o) / 0.5 + 1 : (0.5 * (1 - o)) / 0.5; - var l = (1 - a) * (1 - o); - l > 0.15 && (a = 1 - 0.15 / (1 - o)), - h > a && (h = a), - t.setPartsOpacity(s, h); - } - } - }), - ($.prototype.copyOpacityOtherParts = function (t, i) { - for (var e = 0; e < i.length; e++) { - var r = i[e]; - if (null != r.link && !(r.partsIndex < 0)) - for ( - var o = t.getPartsOpacity(r.partsIndex), n = 0; - n < r.link.length; - n++ - ) { - var s = r.link[n]; - s.partsIndex < 0 || t.setPartsOpacity(s.partsIndex, o); - } - } - }), - (u.prototype.initIndex = function (t) { - (this.paramIndex = t.getParamIndex("VISIBLE:" + this.id)), - (this.partsIndex = t.getPartsDataIndex(PartsDataID.getID(this.id))), - t.setParamFloat(this.paramIndex, 1); - }), - (p.FRAME_RATE = 30), - (p.prototype.setPoint = function (t, i) { - (this.faceTargetX = t), (this.faceTargetY = i); - }), - (p.prototype.getX = function () { - return this.faceX; - }), - (p.prototype.getY = function () { - return this.faceY; - }), - (p.prototype.update = function () { - var t = 40 / 7.5 / p.FRAME_RATE; - if (0 == this.lastTimeSec) - return void (this.lastTimeSec = UtSystem.getUserTimeMSec()); - var i = UtSystem.getUserTimeMSec(), - e = ((i - this.lastTimeSec) * p.FRAME_RATE) / 1e3; - this.lastTimeSec = i; - var r = 0.15 * p.FRAME_RATE, - o = (e * t) / r, - n = this.faceTargetX - this.faceX, - s = this.faceTargetY - this.faceY; - if (!(Math.abs(n) <= this.EPSILON && Math.abs(s) <= this.EPSILON)) { - var _ = Math.sqrt(n * n + s * s), - a = (t * n) / _, - h = (t * s) / _, - l = a - this.faceVX, - $ = h - this.faceVY, - u = Math.sqrt(l * l + $ * $); - (u < -o || u > o) && ((l *= o / u), ($ *= o / u), (u = o)), - (this.faceVX += l), - (this.faceVY += $); - var f = 0.5 * (Math.sqrt(o * o + 16 * o * _ - 8 * o * _) - o), - c = Math.sqrt( - this.faceVX * this.faceVX + this.faceVY * this.faceVY - ); - c > f && ((this.faceVX *= f / c), (this.faceVY *= f / c)), - (this.faceX += this.faceVX), - (this.faceY += this.faceVY); - } - }), - (f.prototype = new _()), - (f.prototype.getMaxScale = function () { - return this.max; - }), - (f.prototype.getMinScale = function () { - return this.min; - }), - (f.prototype.setMaxScale = function (t) { - this.max = t; - }), - (f.prototype.setMinScale = function (t) { - this.min = t; - }), - (f.prototype.isMaxScale = function () { - return this.getScaleX() == this.max; - }), - (f.prototype.isMinScale = function () { - return this.getScaleX() == this.min; - }), - (f.prototype.adjustTranslate = function (t, i) { - this.tr[0] * this.maxLeft + (this.tr[12] + t) > this.screenLeft && - (t = this.screenLeft - this.tr[0] * this.maxLeft - this.tr[12]), - this.tr[0] * this.maxRight + (this.tr[12] + t) < this.screenRight && - (t = this.screenRight - this.tr[0] * this.maxRight - this.tr[12]), - this.tr[5] * this.maxTop + (this.tr[13] + i) < this.screenTop && - (i = this.screenTop - this.tr[5] * this.maxTop - this.tr[13]), - this.tr[5] * this.maxBottom + (this.tr[13] + i) > this.screenBottom && - (i = this.screenBottom - this.tr[5] * this.maxBottom - this.tr[13]); - var e = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, t, i, 0, 1]; - _.mul(e, this.tr, this.tr); - }), - (f.prototype.adjustScale = function (t, i, e) { - var r = e * this.tr[0]; - r < this.min - ? this.tr[0] > 0 && (e = this.min / this.tr[0]) - : r > this.max && this.tr[0] > 0 && (e = this.max / this.tr[0]); - var o = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, t, i, 0, 1], - n = [e, 0, 0, 0, 0, e, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], - s = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -t, -i, 0, 1]; - _.mul(s, this.tr, this.tr), - _.mul(n, this.tr, this.tr), - _.mul(o, this.tr, this.tr); - }), - (f.prototype.setScreenRect = function (t, i, e, r) { - (this.screenLeft = t), - (this.screenRight = i), - (this.screenTop = r), - (this.screenBottom = e); - }), - (f.prototype.setMaxScreenRect = function (t, i, e, r) { - (this.maxLeft = t), - (this.maxRight = i), - (this.maxTop = r), - (this.maxBottom = e); - }), - (f.prototype.getScreenLeft = function () { - return this.screenLeft; - }), - (f.prototype.getScreenRight = function () { - return this.screenRight; - }), - (f.prototype.getScreenBottom = function () { - return this.screenBottom; - }), - (f.prototype.getScreenTop = function () { - return this.screenTop; - }), - (f.prototype.getMaxLeft = function () { - return this.maxLeft; - }), - (f.prototype.getMaxRight = function () { - return this.maxRight; - }), - (f.prototype.getMaxBottom = function () { - return this.maxBottom; - }), - (f.prototype.getMaxTop = function () { - return this.maxTop; - }), - (c.platformManager = null), - (c.getPlatformManager = function () { - return c.platformManager; - }), - (c.setPlatformManager = function (t) { - c.platformManager = t; - }), - (t.exports = { - L2DTargetPoint: p, - Live2DFramework: c, - L2DViewMatrix: f, - L2DPose: $, - L2DPartsParam: u, - L2DPhysics: l, - L2DMotionManager: h, - L2DModelMatrix: a, - L2DMatrix44: _, - EYE_STATE: g, - L2DEyeBlink: s, - L2DExpressionParam: n, - L2DExpressionMotion: o, - L2DBaseModel: r, - }); - }, - function (t, i, e) { - "use strict"; - var r = { - DEBUG_LOG: !1, - DEBUG_MOUSE_LOG: !1, - DEBUG_DRAW_HIT_AREA: !1, - DEBUG_DRAW_ALPHA_MODEL: !1, - VIEW_MAX_SCALE: 2, - VIEW_MIN_SCALE: 0.8, - VIEW_LOGICAL_LEFT: -1, - VIEW_LOGICAL_RIGHT: 1, - VIEW_LOGICAL_MAX_LEFT: -2, - VIEW_LOGICAL_MAX_RIGHT: 2, - VIEW_LOGICAL_MAX_BOTTOM: -2, - VIEW_LOGICAL_MAX_TOP: 2, - PRIORITY_NONE: 0, - PRIORITY_IDLE: 1, - PRIORITY_SLEEPY: 2, - PRIORITY_NORMAL: 3, - PRIORITY_FORCE: 4, - MOTION_GROUP_IDLE: "idle", - MOTION_GROUP_SLEEPY: "sleepy", - MOTION_GROUP_TAP_BODY: "tap_body", - MOTION_GROUP_FLICK_HEAD: "flick_head", - MOTION_GROUP_PINCH_IN: "pinch_in", - MOTION_GROUP_PINCH_OUT: "pinch_out", - MOTION_GROUP_SHAKE: "shake", - HIT_AREA_HEAD: "head", - HIT_AREA_BODY: "body", - }; - t.exports = r; - }, - function (t, i, e) { - "use strict"; - function r(t) { - n = t; - } - function o() { - return n; - } - Object.defineProperty(i, "__esModule", { value: !0 }), - (i.setContext = r), - (i.getContext = o); - var n = void 0; - }, - function (t, i, e) { - "use strict"; - function r() {} - (r.matrixStack = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]), - (r.depth = 0), - (r.currentMatrix = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]), - (r.tmp = new Array(16)), - (r.reset = function () { - this.depth = 0; - }), - (r.loadIdentity = function () { - for (var t = 0; t < 16; t++) this.currentMatrix[t] = t % 5 == 0 ? 1 : 0; - }), - (r.push = function () { - var t = (this.depth, 16 * (this.depth + 1)); - this.matrixStack.length < t + 16 && (this.matrixStack.length = t + 16); - for (var i = 0; i < 16; i++) - this.matrixStack[t + i] = this.currentMatrix[i]; - this.depth++; - }), - (r.pop = function () { - --this.depth < 0 && - (myError("Invalid matrix stack."), (this.depth = 0)); - for (var t = 16 * this.depth, i = 0; i < 16; i++) - this.currentMatrix[i] = this.matrixStack[t + i]; - }), - (r.getMatrix = function () { - return this.currentMatrix; - }), - (r.multMatrix = function (t) { - var i, e, r; - for (i = 0; i < 16; i++) this.tmp[i] = 0; - for (i = 0; i < 4; i++) - for (e = 0; e < 4; e++) - for (r = 0; r < 4; r++) - this.tmp[i + 4 * e] += - this.currentMatrix[i + 4 * r] * t[r + 4 * e]; - for (i = 0; i < 16; i++) this.currentMatrix[i] = this.tmp[i]; - }), - (t.exports = r); - }, - function (t, i, e) { - t.exports = e(5); - }, - function (t, i, e) { - "use strict"; - function r(t) { - return t && t.__esModule ? t : { default: t }; - } - function o(t) { - (C = t), - C.addEventListener && - (window.addEventListener("click", g), - window.addEventListener("mousedown", g), - window.addEventListener("mousemove", g), - window.addEventListener("mouseup", g), - document.addEventListener("mouseout", g), - window.addEventListener("touchstart", y), - window.addEventListener("touchend", y), - window.addEventListener("touchmove", y)); - } - function n(t) { - var i = C.width, - e = C.height; - N = new M.L2DTargetPoint(); - var r = e / i, - o = w.default.VIEW_LOGICAL_LEFT, - n = w.default.VIEW_LOGICAL_RIGHT, - _ = -r, - h = r; - if ( - ((window.Live2D.captureFrame = !1), - (B = new M.L2DViewMatrix()), - B.setScreenRect(o, n, _, h), - B.setMaxScreenRect( - w.default.VIEW_LOGICAL_MAX_LEFT, - w.default.VIEW_LOGICAL_MAX_RIGHT, - w.default.VIEW_LOGICAL_MAX_BOTTOM, - w.default.VIEW_LOGICAL_MAX_TOP - ), - B.setMaxScale(w.default.VIEW_MAX_SCALE), - B.setMinScale(w.default.VIEW_MIN_SCALE), - (U = new M.L2DMatrix44()), - U.multScale(1, i / e), - (G = new M.L2DMatrix44()), - G.multTranslate(-i / 2, -e / 2), - G.multScale(2 / i, -2 / i), - (F = v()), - (0, D.setContext)(F), - !F) - ) - return ( - console.error("Failed to create WebGL context."), - void ( - window.WebGLRenderingContext && - console.error( - "Your browser don't support WebGL, check https://get.webgl.org/ for futher information." - ) - ) - ); - window.Live2D.setGL(F), F.clearColor(0, 0, 0, 0), a(t), s(); - } - function s() { - b || - ((b = !0), - (function t() { - _(); - var i = - window.requestAnimationFrame || - window.mozRequestAnimationFrame || - window.webkitRequestAnimationFrame || - window.msRequestAnimationFrame; - if (window.Live2D.captureFrame) { - window.Live2D.captureFrame = !1; - var e = document.createElement("a"); - document.body.appendChild(e), - e.setAttribute("type", "hidden"), - (e.href = C.toDataURL()), - (e.download = window.Live2D.captureName || "live2d.png"), - e.click(); - } - i(t, C); - })()); - } - function _() { - O.default.reset(), - O.default.loadIdentity(), - N.update(), - R.setDrag(N.getX(), N.getY()), - F.clear(F.COLOR_BUFFER_BIT), - O.default.multMatrix(U.getArray()), - O.default.multMatrix(B.getArray()), - O.default.push(); - for (var t = 0; t < R.numModels(); t++) { - var i = R.getModel(t); - if (null == i) return; - i.initialized && !i.updating && (i.update(), i.draw(F)); - } - O.default.pop(); - } - function a(t) { - (R.reloadFlg = !0), R.count++, R.changeModel(F, t); - } - function h(t, i) { - return t.x * i.x + t.y * i.y; - } - function l(t, i) { - var e = Math.sqrt(t * t + i * i); - return { x: t / e, y: i / e }; - } - function $(t, i, e) { - function r(t, i) { - return (180 * Math.acos(h({ x: 0, y: 1 }, l(t, i)))) / Math.PI; - } - if ( - i.x < e.left + e.width && - i.y < e.top + e.height && - i.x > e.left && - i.y > e.top - ) - return i; - var o = t.x - i.x, - n = t.y - i.y, - s = r(o, n); - i.x < t.x && (s = 360 - s); - var _ = 360 - r(e.left - t.x, -1 * (e.top - t.y)), - a = 360 - r(e.left - t.x, -1 * (e.top + e.height - t.y)), - $ = r(e.left + e.width - t.x, -1 * (e.top - t.y)), - u = r(e.left + e.width - t.x, -1 * (e.top + e.height - t.y)), - p = n / o, - f = {}; - if (s < $) { - var c = e.top - t.y, - d = c / p; - f = { y: t.y + c, x: t.x + d }; - } else if (s < u) { - var g = e.left + e.width - t.x, - y = g * p; - f = { y: t.y + y, x: t.x + g }; - } else if (s < a) { - var m = e.top + e.height - t.y, - T = m / p; - f = { y: t.y + m, x: t.x + T }; - } else if (s < _) { - var P = t.x - e.left, - S = P * p; - f = { y: t.y - S, x: t.x - P }; - } else { - var v = e.top - t.y, - L = v / p; - f = { y: t.y + v, x: t.x + L }; - } - return f; - } - function u(t) { - Y = !0; - var i = C.getBoundingClientRect(), - e = P(t.clientX - i.left), - r = S(t.clientY - i.top), - o = $( - { x: i.left + i.width / 2, y: i.top + i.height * X }, - { x: t.clientX, y: t.clientY }, - i - ), - n = m(o.x - i.left), - s = T(o.y - i.top); - w.default.DEBUG_MOUSE_LOG && - console.log( - "onMouseMove device( x:" + - t.clientX + - " y:" + - t.clientY + - " ) view( x:" + - n + - " y:" + - s + - ")" - ), - (k = e), - (V = r), - N.setPoint(n, s); - } - function p(t) { - Y = !0; - var i = C.getBoundingClientRect(), - e = P(t.clientX - i.left), - r = S(t.clientY - i.top), - o = $( - { x: i.left + i.width / 2, y: i.top + i.height * X }, - { x: t.clientX, y: t.clientY }, - i - ), - n = m(o.x - i.left), - s = T(o.y - i.top); - w.default.DEBUG_MOUSE_LOG && - console.log( - "onMouseDown device( x:" + - t.clientX + - " y:" + - t.clientY + - " ) view( x:" + - n + - " y:" + - s + - ")" - ), - (k = e), - (V = r), - R.tapEvent(n, s); - } - function f(t) { - var i = C.getBoundingClientRect(), - e = P(t.clientX - i.left), - r = S(t.clientY - i.top), - o = $( - { x: i.left + i.width / 2, y: i.top + i.height * X }, - { x: t.clientX, y: t.clientY }, - i - ), - n = m(o.x - i.left), - s = T(o.y - i.top); - w.default.DEBUG_MOUSE_LOG && - console.log( - "onMouseMove device( x:" + - t.clientX + - " y:" + - t.clientY + - " ) view( x:" + - n + - " y:" + - s + - ")" - ), - Y && ((k = e), (V = r), N.setPoint(n, s)); - } - function c() { - Y && (Y = !1), N.setPoint(0, 0); - } - function d() { - w.default.DEBUG_LOG && console.log("Set Session Storage."), - sessionStorage.setItem("Sleepy", "1"); - } - function g(t) { - if ("mousewheel" == t.type); - else if ("mousedown" == t.type) p(t); - else if ("mousemove" == t.type) { - var i = sessionStorage.getItem("Sleepy"); - "1" === i && sessionStorage.setItem("Sleepy", "0"), u(t); - } else if ("mouseup" == t.type) { - if ("button" in t && 0 != t.button) return; - } else if ("mouseout" == t.type) { - w.default.DEBUG_LOG && console.log("Mouse out Window."), c(); - var e = sessionStorage.getItem("SleepyTimer"); - window.clearTimeout(e), - (e = window.setTimeout(d, 5e4)), - sessionStorage.setItem("SleepyTimer", e); - } - } - function y(t) { - var i = t.touches[0]; - "touchstart" == t.type - ? 1 == t.touches.length && u(i) - : "touchmove" == t.type - ? f(i) - : "touchend" == t.type && c(); - } - function m(t) { - var i = G.transformX(t); - return B.invertTransformX(i); - } - function T(t) { - var i = G.transformY(t); - return B.invertTransformY(i); - } - function P(t) { - return G.transformX(t); - } - function S(t) { - return G.transformY(t); - } - function v() { - for ( - var t = ["webgl", "experimental-webgl", "webkit-3d", "moz-webgl"], - i = 0; - i < t.length; - i++ - ) - try { - var e = C.getContext(t[i], { premultipliedAlpha: !0 }); - if (e) return e; - } catch (t) {} - return null; - } - function L(t, i, e) { - (X = void 0 === e ? 0.5 : e), o(t), n(i); - } - e(6); - var M = e(0), - E = e(8), - A = r(E), - I = e(1), - w = r(I), - x = e(3), - O = r(x), - D = e(2), - R = (window.navigator.platform.toLowerCase(), new A.default()), - b = !1, - F = null, - C = null, - N = null, - B = null, - U = null, - G = null, - Y = !1, - k = 0, - V = 0, - X = 0.5; - window.loadlive2d = L; - }, - function (t, i, e) { - "use strict"; - (function (t) { - !(function () { - function i() { - At || - ((this._$MT = null), - (this._$5S = null), - (this._$NP = 0), - i._$42++, - (this._$5S = new Y(this))); - } - function e(t) { - if (!At) { - (this.clipContextList = new Array()), - (this.glcontext = t.gl), - (this.dp_webgl = t), - (this.curFrameNo = 0), - (this.firstError_clipInNotUpdate = !0), - (this.colorBuffer = 0), - (this.isInitGLFBFunc = !1), - (this.tmpBoundsOnModel = new S()), - at.glContext.length > at.frameBuffers.length && - (this.curFrameNo = this.getMaskRenderTexture()), - (this.tmpModelToViewMatrix = new R()), - (this.tmpMatrix2 = new R()), - (this.tmpMatrixForMask = new R()), - (this.tmpMatrixForDraw = new R()), - (this.CHANNEL_COLORS = new Array()); - var i = new A(); - (i = new A()), - (i.r = 0), - (i.g = 0), - (i.b = 0), - (i.a = 1), - this.CHANNEL_COLORS.push(i), - (i = new A()), - (i.r = 1), - (i.g = 0), - (i.b = 0), - (i.a = 0), - this.CHANNEL_COLORS.push(i), - (i = new A()), - (i.r = 0), - (i.g = 1), - (i.b = 0), - (i.a = 0), - this.CHANNEL_COLORS.push(i), - (i = new A()), - (i.r = 0), - (i.g = 0), - (i.b = 1), - (i.a = 0), - this.CHANNEL_COLORS.push(i); - for (var e = 0; e < this.CHANNEL_COLORS.length; e++) - this.dp_webgl.setChannelFlagAsColor(e, this.CHANNEL_COLORS[e]); - } - } - function r(t, i, e) { - (this.clipIDList = new Array()), - (this.clipIDList = e), - (this.clippingMaskDrawIndexList = new Array()); - for (var r = 0; r < e.length; r++) - this.clippingMaskDrawIndexList.push(i.getDrawDataIndex(e[r])); - (this.clippedDrawContextList = new Array()), - (this.isUsing = !0), - (this.layoutChannelNo = 0), - (this.layoutBounds = new S()), - (this.allClippedDrawRect = new S()), - (this.matrixForMask = new Float32Array(16)), - (this.matrixForDraw = new Float32Array(16)), - (this.owner = t); - } - function o(t, i) { - (this._$gP = t), (this.drawDataIndex = i); - } - function n() { - At || (this.color = null); - } - function s() { - At || - ((this._$dP = null), - (this._$eo = null), - (this._$V0 = null), - (this._$dP = 1e3), - (this._$eo = 1e3), - (this._$V0 = 1), - this._$a0()); - } - function _() {} - function a() { - (this._$r = null), (this._$0S = null); - } - function h() { - At || - ((this.x = null), - (this.y = null), - (this.width = null), - (this.height = null)); - } - function l(t) { - At || et.prototype.constructor.call(this, t); - } - function $() {} - function u(t) { - At || et.prototype.constructor.call(this, t); - } - function p() { - At || - ((this._$vo = null), - (this._$F2 = null), - (this._$ao = 400), - (this._$1S = 400), - p._$42++); - } - function f() { - At || - ((this.p1 = new c()), - (this.p2 = new c()), - (this._$Fo = 0), - (this._$Db = 0), - (this._$L2 = 0), - (this._$M2 = 0), - (this._$ks = 0), - (this._$9b = 0), - (this._$iP = 0), - (this._$iT = 0), - (this._$lL = new Array()), - (this._$qP = new Array()), - this.setup(0.3, 0.5, 0.1)); - } - function c() { - (this._$p = 1), - (this.x = 0), - (this.y = 0), - (this.vx = 0), - (this.vy = 0), - (this.ax = 0), - (this.ay = 0), - (this.fx = 0), - (this.fy = 0), - (this._$s0 = 0), - (this._$70 = 0), - (this._$7L = 0), - (this._$HL = 0); - } - function d(t, i, e) { - (this._$wL = null), - (this.scale = null), - (this._$V0 = null), - (this._$wL = t), - (this.scale = i), - (this._$V0 = e); - } - function g(t, i, e, r) { - d.prototype.constructor.call(this, i, e, r), - (this._$tL = null), - (this._$tL = t); - } - function y(t, i, e) { - (this._$wL = null), - (this.scale = null), - (this._$V0 = null), - (this._$wL = t), - (this.scale = i), - (this._$V0 = e); - } - function T(t, i, e, r) { - y.prototype.constructor.call(this, i, e, r), - (this._$YP = null), - (this._$YP = t); - } - function P() { - At || - ((this._$fL = 0), - (this._$gL = 0), - (this._$B0 = 1), - (this._$z0 = 1), - (this._$qT = 0), - (this.reflectX = !1), - (this.reflectY = !1)); - } - function S() { - At || - ((this.x = null), - (this.y = null), - (this.width = null), - (this.height = null)); - } - function v() {} - function L() { - At || ((this.x = null), (this.y = null)); - } - function M() { - At || - ((this._$gP = null), - (this._$dr = null), - (this._$GS = null), - (this._$qb = null), - (this._$Lb = null), - (this._$mS = null), - (this.clipID = null), - (this.clipIDList = new Array())); - } - function E() { - At || - ((this._$Eb = E._$ps), - (this._$lT = 1), - (this._$C0 = 1), - (this._$tT = 1), - (this._$WL = 1), - (this.culling = !1), - (this.matrix4x4 = new Float32Array(16)), - (this.premultipliedAlpha = !1), - (this.anisotropy = 0), - (this.clippingProcess = E.CLIPPING_PROCESS_NONE), - (this.clipBufPre_clipContextMask = null), - (this.clipBufPre_clipContextDraw = null), - (this.CHANNEL_COLORS = new Array())); - } - function A() { - At || - ((this.a = 1), - (this.r = 1), - (this.g = 1), - (this.b = 1), - (this.scale = 1), - (this._$ho = 1), - (this.blendMode = at.L2D_COLOR_BLEND_MODE_MULT)); - } - function I() { - At || - ((this._$kP = null), - (this._$dr = null), - (this._$Ai = !0), - (this._$mS = null)); - } - function w() {} - function x() { - At || - ((this._$VP = 0), - (this._$wL = null), - (this._$GP = null), - (this._$8o = x._$ds), - (this._$2r = -1), - (this._$O2 = 0), - (this._$ri = 0)); - } - function O() {} - function D() { - At || (this._$Ob = null); - } - function R() { - (this.m = new Float32Array(16)), this.identity(); - } - function b(t) { - At || et.prototype.constructor.call(this, t); - } - function F() { - At || - ((this._$7 = 1), - (this._$f = 0), - (this._$H = 0), - (this._$g = 1), - (this._$k = 0), - (this._$w = 0), - (this._$hi = STATE_IDENTITY), - (this._$Z = _$pS)); - } - function C() { - At || - (s.prototype.constructor.call(this), - (this.motions = new Array()), - (this._$7r = null), - (this._$7r = C._$Co++), - (this._$D0 = 30), - (this._$yT = 0), - (this._$E = !0), - (this.loopFadeIn = !0), - (this._$AS = -1), - _$a0()); - } - function N() { - (this._$P = new Float32Array(100)), (this.size = 0); - } - function B() { - (this._$4P = null), (this._$I0 = null), (this._$RP = null); - } - function U() {} - function G() {} - function Y(t) { - At || - ((this._$QT = !0), - (this._$co = -1), - (this._$qo = 0), - (this._$pb = new Array(Y._$is)), - (this._$_2 = new Float32Array(Y._$is)), - (this._$vr = new Float32Array(Y._$is)), - (this._$Rr = new Float32Array(Y._$is)), - (this._$Or = new Float32Array(Y._$is)), - (this._$fs = new Float32Array(Y._$is)), - (this._$Js = new Array(Y._$is)), - (this._$3S = new Array()), - (this._$aS = new Array()), - (this._$Bo = null), - (this._$F2 = new Array()), - (this._$db = new Array()), - (this._$8b = new Array()), - (this._$Hr = new Array()), - (this._$Ws = null), - (this._$Vs = null), - (this._$Er = null), - (this._$Es = new Int16Array(U._$Qb)), - (this._$ZP = new Float32Array(2 * U._$1r)), - (this._$Ri = t), - (this._$b0 = Y._$HP++), - (this.clipManager = null), - (this.dp_webgl = null)); - } - function k() {} - function V() { - At || - ((this._$12 = null), - (this._$bb = null), - (this._$_L = null), - (this._$jo = null), - (this._$iL = null), - (this._$0L = null), - (this._$Br = null), - (this._$Dr = null), - (this._$Cb = null), - (this._$mr = null), - (this._$_L = wt.STATE_FIRST), - (this._$Br = 4e3), - (this._$Dr = 100), - (this._$Cb = 50), - (this._$mr = 150), - (this._$jo = !0), - (this._$iL = "PARAM_EYE_L_OPEN"), - (this._$0L = "PARAM_EYE_R_OPEN")); - } - function X() { - At || - (E.prototype.constructor.call(this), - (this._$sb = new Int32Array(X._$As)), - (this._$U2 = new Array()), - (this.transform = null), - (this.gl = null), - null == X._$NT && - ((X._$NT = X._$9r(256)), - (X._$vS = X._$9r(256)), - (X._$no = X._$vb(256)))); - } - function z() { - At || - (I.prototype.constructor.call(this), - (this._$GS = null), - (this._$Y0 = null)); - } - function H(t) { - _t.prototype.constructor.call(this, t), - (this._$8r = I._$ur), - (this._$Yr = null), - (this._$Wr = null); - } - function W() { - At || - (M.prototype.constructor.call(this), - (this._$gP = null), - (this._$dr = null), - (this._$GS = null), - (this._$qb = null), - (this._$Lb = null), - (this._$mS = null)); - } - function j() { - At || - ((this._$NL = null), - (this._$3S = null), - (this._$aS = null), - j._$42++); - } - function q() { - At || (i.prototype.constructor.call(this), (this._$zo = new X())); - } - function J() { - At || - (s.prototype.constructor.call(this), - (this.motions = new Array()), - (this._$o2 = null), - (this._$7r = J._$Co++), - (this._$D0 = 30), - (this._$yT = 0), - (this._$E = !1), - (this.loopFadeIn = !0), - (this._$rr = -1), - (this._$eP = 0)); - } - function Q(t, i) { - return String.fromCharCode(t.getUint8(i)); - } - function N() { - (this._$P = new Float32Array(100)), (this.size = 0); - } - function B() { - (this._$4P = null), (this._$I0 = null), (this._$RP = null); - } - function Z() { - At || - (I.prototype.constructor.call(this), - (this._$o = 0), - (this._$A = 0), - (this._$GS = null), - (this._$Eo = null)); - } - function K(t) { - _t.prototype.constructor.call(this, t), - (this._$8r = I._$ur), - (this._$Cr = null), - (this._$hr = null); - } - function tt() { - At || - ((this.visible = !0), - (this._$g0 = !1), - (this._$NL = null), - (this._$3S = null), - (this._$aS = null), - tt._$42++); - } - function it(t) { - (this._$VS = null), (this._$e0 = null), (this._$e0 = t); - } - function et(t) { - At || (this.id = t); - } - function rt() {} - function ot() { - At || (this._$4S = null); - } - function nt(t, i) { - (this.canvas = t), - (this.context = i), - (this.viewport = new Array(0, 0, t.width, t.height)), - (this._$6r = 1), - (this._$xP = 0), - (this._$3r = 1), - (this._$uP = 0), - (this._$Qo = -1), - (this.cacheImages = {}); - } - function st() { - At || - ((this._$TT = null), - (this._$LT = null), - (this._$FS = null), - (this._$wL = null)); - } - function _t(t) { - At || - ((this._$e0 = null), - (this._$IP = null), - (this._$JS = !1), - (this._$AT = !0), - (this._$e0 = t), - (this.totalScale = 1), - (this._$7s = 1), - (this.totalOpacity = 1)); - } - function at() {} - function ht() {} - function lt(t) { - At || (this._$ib = t); - } - function $t() { - At || - (W.prototype.constructor.call(this), - (this._$LP = -1), - (this._$d0 = 0), - (this._$Yo = 0), - (this._$JP = null), - (this._$5P = null), - (this._$BP = null), - (this._$Eo = null), - (this._$Qi = null), - (this._$6s = $t._$ms), - (this.culling = !0), - (this.gl_cacheImage = null), - (this.instanceNo = $t._$42++)); - } - function ut(t) { - Mt.prototype.constructor.call(this, t), - (this._$8r = W._$ur), - (this._$Cr = null), - (this._$hr = null); - } - function pt() { - At || ((this.x = null), (this.y = null)); - } - function ft(t) { - At || - (i.prototype.constructor.call(this), - (this.drawParamWebGL = new mt(t)), - this.drawParamWebGL.setGL(at.getGL(t))); - } - function ct() { - At || - ((this.motions = null), - (this._$eb = !1), - (this.motions = new Array())); - } - function dt() { - (this._$w0 = null), - (this._$AT = !0), - (this._$9L = !1), - (this._$z2 = -1), - (this._$bs = -1), - (this._$Do = -1), - (this._$sr = null), - (this._$sr = dt._$Gs++); - } - function gt() { - this.m = new Array(1, 0, 0, 0, 1, 0, 0, 0, 1); - } - function yt(t) { - At || et.prototype.constructor.call(this, t); - } - function mt(t) { - At || - (E.prototype.constructor.call(this), - (this.textures = new Array()), - (this.transform = null), - (this.gl = null), - (this.glno = t), - (this.firstDraw = !0), - (this.anisotropyExt = null), - (this.maxAnisotropy = 0), - (this._$As = 32), - (this._$Gr = !1), - (this._$NT = null), - (this._$vS = null), - (this._$no = null), - (this.vertShader = null), - (this.fragShader = null), - (this.vertShaderOff = null), - (this.fragShaderOff = null)); - } - function Tt(t, i, e) { - return ( - null == i && (i = t.createBuffer()), - t.bindBuffer(t.ARRAY_BUFFER, i), - t.bufferData(t.ARRAY_BUFFER, e, t.DYNAMIC_DRAW), - i - ); - } - function Pt(t, i, e) { - return ( - null == i && (i = t.createBuffer()), - t.bindBuffer(t.ELEMENT_ARRAY_BUFFER, i), - t.bufferData(t.ELEMENT_ARRAY_BUFFER, e, t.DYNAMIC_DRAW), - i - ); - } - function St(t) { - At || - ((this._$P = new Int8Array(8)), - (this._$R0 = new DataView(this._$P.buffer)), - (this._$3i = new Int8Array(1e3)), - (this._$hL = 0), - (this._$v0 = 0), - (this._$S2 = 0), - (this._$Ko = new Array()), - (this._$T = t), - (this._$F = 0)); - } - function vt() {} - function Lt() {} - function Mt(t) { - At || - ((this._$e0 = null), - (this._$IP = null), - (this._$Us = null), - (this._$7s = null), - (this._$IS = [!1]), - (this._$VS = null), - (this._$AT = !0), - (this.baseOpacity = 1), - (this.clipBufPre_clipContext = null), - (this._$e0 = t)); - } - function Et() {} - var At = !0; - (i._$0s = 1), - (i._$4s = 2), - (i._$42 = 0), - (i._$62 = function (t, e) { - try { - if ( - (e instanceof ArrayBuffer && (e = new DataView(e)), - !(e instanceof DataView)) - ) - throw new lt( - "_$SS#loadModel(b) / b _$x be DataView or ArrayBuffer" - ); - var r, - o = new St(e), - n = o._$ST(), - s = o._$ST(), - a = o._$ST(); - if (109 != n || 111 != s || 99 != a) - throw new lt("_$gi _$C _$li , _$Q0 _$P0."); - if (((r = o._$ST()), o._$gr(r), r > G._$T7)) { - t._$NP |= i._$4s; - throw new lt( - "_$gi _$C _$li , _$n0 _$_ version _$li ( SDK : " + - G._$T7 + - " < _$f0 : " + - r + - " )@_$SS#loadModel()\n" - ); - } - var h = o._$nP(); - if (r >= G._$s7) { - var l = o._$9T(), - $ = o._$9T(); - if (-30584 != l || -30584 != $) - throw ( - ((t._$NP |= i._$0s), - new lt("_$gi _$C _$li , _$0 _$6 _$Ui.")) - ); - } - t._$KS(h); - var u = t.getModelContext(); - u.setDrawParam(t.getDrawParam()), u.init(); - } catch (t) { - _._$Rb(t); - } - }), - (i.prototype._$KS = function (t) { - this._$MT = t; - }), - (i.prototype.getModelImpl = function () { - return ( - null == this._$MT && ((this._$MT = new p()), this._$MT._$zP()), - this._$MT - ); - }), - (i.prototype.getCanvasWidth = function () { - return null == this._$MT ? 0 : this._$MT.getCanvasWidth(); - }), - (i.prototype.getCanvasHeight = function () { - return null == this._$MT ? 0 : this._$MT.getCanvasHeight(); - }), - (i.prototype.getParamFloat = function (t) { - return ( - "number" != typeof t && (t = this._$5S.getParamIndex(u.getID(t))), - this._$5S.getParamFloat(t) - ); - }), - (i.prototype.setParamFloat = function (t, i, e) { - "number" != typeof t && (t = this._$5S.getParamIndex(u.getID(t))), - arguments.length < 3 && (e = 1), - this._$5S.setParamFloat( - t, - this._$5S.getParamFloat(t) * (1 - e) + i * e - ); - }), - (i.prototype.addToParamFloat = function (t, i, e) { - "number" != typeof t && (t = this._$5S.getParamIndex(u.getID(t))), - arguments.length < 3 && (e = 1), - this._$5S.setParamFloat(t, this._$5S.getParamFloat(t) + i * e); - }), - (i.prototype.multParamFloat = function (t, i, e) { - "number" != typeof t && (t = this._$5S.getParamIndex(u.getID(t))), - arguments.length < 3 && (e = 1), - this._$5S.setParamFloat( - t, - this._$5S.getParamFloat(t) * (1 + (i - 1) * e) - ); - }), - (i.prototype.getParamIndex = function (t) { - return this._$5S.getParamIndex(u.getID(t)); - }), - (i.prototype.loadParam = function () { - this._$5S.loadParam(); - }), - (i.prototype.saveParam = function () { - this._$5S.saveParam(); - }), - (i.prototype.init = function () { - this._$5S.init(); - }), - (i.prototype.update = function () { - this._$5S.update(); - }), - (i.prototype._$Rs = function () { - return _._$li("_$60 _$PT _$Rs()"), -1; - }), - (i.prototype._$Ds = function (t) { - _._$li("_$60 _$PT _$SS#_$Ds() \n"); - }), - (i.prototype._$K2 = function () {}), - (i.prototype.draw = function () {}), - (i.prototype.getModelContext = function () { - return this._$5S; - }), - (i.prototype._$s2 = function () { - return this._$NP; - }), - (i.prototype._$P7 = function (t, i, e, r) { - var o = -1, - n = 0, - s = this; - if (0 != e) - if (1 == t.length) { - var _ = t[0], - a = 0 != s.getParamFloat(_), - h = i[0], - l = s.getPartsOpacity(h), - $ = e / r; - a ? (l += $) > 1 && (l = 1) : (l -= $) < 0 && (l = 0), - s.setPartsOpacity(h, l); - } else { - for (var u = 0; u < t.length; u++) { - var _ = t[u], - p = 0 != s.getParamFloat(_); - if (p) { - if (o >= 0) break; - o = u; - var h = i[u]; - (n = s.getPartsOpacity(h)), (n += e / r), n > 1 && (n = 1); - } - } - o < 0 && - (console.log("No _$wi _$q0/ _$U default[%s]", t[0]), - (o = 0), - (n = 1), - s.loadParam(), - s.setParamFloat(t[o], n), - s.saveParam()); - for (var u = 0; u < t.length; u++) { - var h = i[u]; - if (o == u) s.setPartsOpacity(h, n); - else { - var f, - c = s.getPartsOpacity(h); - f = n < 0.5 ? (-0.5 * n) / 0.5 + 1 : (0.5 * (1 - n)) / 0.5; - var d = (1 - f) * (1 - n); - d > 0.15 && (f = 1 - 0.15 / (1 - n)), - c > f && (c = f), - s.setPartsOpacity(h, c); - } - } - } - else - for (var u = 0; u < t.length; u++) { - var _ = t[u], - h = i[u], - p = 0 != s.getParamFloat(_); - s.setPartsOpacity(h, p ? 1 : 0); - } - }), - (i.prototype.setPartsOpacity = function (t, i) { - "number" != typeof t && - (t = this._$5S.getPartsDataIndex(l.getID(t))), - this._$5S.setPartsOpacity(t, i); - }), - (i.prototype.getPartsDataIndex = function (t) { - return ( - t instanceof l || (t = l.getID(t)), this._$5S.getPartsDataIndex(t) - ); - }), - (i.prototype.getPartsOpacity = function (t) { - return ( - "number" != typeof t && - (t = this._$5S.getPartsDataIndex(l.getID(t))), - t < 0 ? 0 : this._$5S.getPartsOpacity(t) - ); - }), - (i.prototype.getDrawParam = function () {}), - (i.prototype.getDrawDataIndex = function (t) { - return this._$5S.getDrawDataIndex(b.getID(t)); - }), - (i.prototype.getDrawData = function (t) { - return this._$5S.getDrawData(t); - }), - (i.prototype.getTransformedPoints = function (t) { - var i = this._$5S._$C2(t); - return i instanceof ut ? i.getTransformedPoints() : null; - }), - (i.prototype.getIndexArray = function (t) { - if (t < 0 || t >= this._$5S._$aS.length) return null; - var i = this._$5S._$aS[t]; - return null != i && i.getType() == W._$wb && i instanceof $t - ? i.getIndexArray() - : null; - }), - (e.CHANNEL_COUNT = 4), - (e.RENDER_TEXTURE_USE_MIPMAP = !1), - (e.NOT_USED_FRAME = -100), - (e.prototype._$L7 = function () { - if ( - (this.tmpModelToViewMatrix && (this.tmpModelToViewMatrix = null), - this.tmpMatrix2 && (this.tmpMatrix2 = null), - this.tmpMatrixForMask && (this.tmpMatrixForMask = null), - this.tmpMatrixForDraw && (this.tmpMatrixForDraw = null), - this.tmpBoundsOnModel && (this.tmpBoundsOnModel = null), - this.CHANNEL_COLORS) - ) { - for (var t = this.CHANNEL_COLORS.length - 1; t >= 0; --t) - this.CHANNEL_COLORS.splice(t, 1); - this.CHANNEL_COLORS = []; - } - this.releaseShader(); - }), - (e.prototype.releaseShader = function () { - for (var t = at.frameBuffers.length, i = 0; i < t; i++) - this.gl.deleteFramebuffer(at.frameBuffers[i].framebuffer); - (at.frameBuffers = []), (at.glContext = []); - }), - (e.prototype.init = function (t, i, e) { - for (var o = 0; o < i.length; o++) { - var n = i[o].getClipIDList(); - if (null != n) { - var s = this.findSameClip(n); - null == s && - ((s = new r(this, t, n)), this.clipContextList.push(s)); - var _ = i[o].getDrawDataID(), - a = t.getDrawDataIndex(_); - s.addClippedDrawData(_, a); - e[o].clipBufPre_clipContext = s; - } - } - }), - (e.prototype.getMaskRenderTexture = function () { - var t = null; - return ( - (t = this.dp_webgl.createFramebuffer()), - (at.frameBuffers[this.dp_webgl.glno] = t), - this.dp_webgl.glno - ); - }), - (e.prototype.setupClip = function (t, i) { - for (var e = 0, r = 0; r < this.clipContextList.length; r++) { - var o = this.clipContextList[r]; - this.calcClippedDrawTotalBounds(t, o), o.isUsing && e++; - } - if (e > 0) { - var n = i.gl.getParameter(i.gl.FRAMEBUFFER_BINDING), - s = new Array(4); - (s[0] = 0), - (s[1] = 0), - (s[2] = i.gl.canvas.width), - (s[3] = i.gl.canvas.height), - i.gl.viewport( - 0, - 0, - at.clippingMaskBufferSize, - at.clippingMaskBufferSize - ), - this.setupLayoutBounds(e), - i.gl.bindFramebuffer( - i.gl.FRAMEBUFFER, - at.frameBuffers[this.curFrameNo].framebuffer - ), - i.gl.clearColor(0, 0, 0, 0), - i.gl.clear(i.gl.COLOR_BUFFER_BIT); - for (var r = 0; r < this.clipContextList.length; r++) { - var o = this.clipContextList[r], - _ = o.allClippedDrawRect, - a = (o.layoutChannelNo, o.layoutBounds); - this.tmpBoundsOnModel._$jL(_), - this.tmpBoundsOnModel.expand(0.05 * _.width, 0.05 * _.height); - var h = a.width / this.tmpBoundsOnModel.width, - l = a.height / this.tmpBoundsOnModel.height; - this.tmpMatrix2.identity(), - this.tmpMatrix2.translate(-1, -1, 0), - this.tmpMatrix2.scale(2, 2, 1), - this.tmpMatrix2.translate(a.x, a.y, 0), - this.tmpMatrix2.scale(h, l, 1), - this.tmpMatrix2.translate( - -this.tmpBoundsOnModel.x, - -this.tmpBoundsOnModel.y, - 0 - ), - this.tmpMatrixForMask.setMatrix(this.tmpMatrix2.m), - this.tmpMatrix2.identity(), - this.tmpMatrix2.translate(a.x, a.y, 0), - this.tmpMatrix2.scale(h, l, 1), - this.tmpMatrix2.translate( - -this.tmpBoundsOnModel.x, - -this.tmpBoundsOnModel.y, - 0 - ), - this.tmpMatrixForDraw.setMatrix(this.tmpMatrix2.m); - for ( - var $ = this.tmpMatrixForMask.getArray(), u = 0; - u < 16; - u++ - ) - o.matrixForMask[u] = $[u]; - for ( - var p = this.tmpMatrixForDraw.getArray(), u = 0; - u < 16; - u++ - ) - o.matrixForDraw[u] = p[u]; - for ( - var f = o.clippingMaskDrawIndexList.length, c = 0; - c < f; - c++ - ) { - var d = o.clippingMaskDrawIndexList[c], - g = t.getDrawData(d), - y = t._$C2(d); - i.setClipBufPre_clipContextForMask(o), g.draw(i, t, y); - } - } - i.gl.bindFramebuffer(i.gl.FRAMEBUFFER, n), - i.setClipBufPre_clipContextForMask(null), - i.gl.viewport(s[0], s[1], s[2], s[3]); - } - }), - (e.prototype.getColorBuffer = function () { - return this.colorBuffer; - }), - (e.prototype.findSameClip = function (t) { - for (var i = 0; i < this.clipContextList.length; i++) { - var e = this.clipContextList[i], - r = e.clipIDList.length; - if (r == t.length) { - for (var o = 0, n = 0; n < r; n++) - for (var s = e.clipIDList[n], _ = 0; _ < r; _++) - if (t[_] == s) { - o++; - break; - } - if (o == r) return e; - } - } - return null; - }), - (e.prototype.calcClippedDrawTotalBounds = function (t, i) { - for ( - var e = t._$Ri.getModelImpl().getCanvasWidth(), - r = t._$Ri.getModelImpl().getCanvasHeight(), - o = e > r ? e : r, - n = o, - s = o, - _ = 0, - a = 0, - h = i.clippedDrawContextList.length, - l = 0; - l < h; - l++ - ) { - var $ = i.clippedDrawContextList[l], - u = $.drawDataIndex, - p = t._$C2(u); - if (p._$yo()) { - for ( - var f = p.getTransformedPoints(), - c = f.length, - d = [], - g = [], - y = 0, - m = U._$i2; - m < c; - m += U._$No - ) - (d[y] = f[m]), (g[y] = f[m + 1]), y++; - var T = Math.min.apply(null, d), - P = Math.min.apply(null, g), - S = Math.max.apply(null, d), - v = Math.max.apply(null, g); - T < n && (n = T), - P < s && (s = P), - S > _ && (_ = S), - v > a && (a = v); - } - } - if (n == o) - (i.allClippedDrawRect.x = 0), - (i.allClippedDrawRect.y = 0), - (i.allClippedDrawRect.width = 0), - (i.allClippedDrawRect.height = 0), - (i.isUsing = !1); - else { - var L = _ - n, - M = a - s; - (i.allClippedDrawRect.x = n), - (i.allClippedDrawRect.y = s), - (i.allClippedDrawRect.width = L), - (i.allClippedDrawRect.height = M), - (i.isUsing = !0); - } - }), - (e.prototype.setupLayoutBounds = function (t) { - var i = t / e.CHANNEL_COUNT, - r = t % e.CHANNEL_COUNT; - (i = ~~i), (r = ~~r); - for (var o = 0, n = 0; n < e.CHANNEL_COUNT; n++) { - var s = i + (n < r ? 1 : 0); - if (0 == s); - else if (1 == s) { - var a = this.clipContextList[o++]; - (a.layoutChannelNo = n), - (a.layoutBounds.x = 0), - (a.layoutBounds.y = 0), - (a.layoutBounds.width = 1), - (a.layoutBounds.height = 1); - } else if (2 == s) - for (var h = 0; h < s; h++) { - var l = h % 2, - $ = 0; - l = ~~l; - var a = this.clipContextList[o++]; - (a.layoutChannelNo = n), - (a.layoutBounds.x = 0.5 * l), - (a.layoutBounds.y = 0), - (a.layoutBounds.width = 0.5), - (a.layoutBounds.height = 1); - } - else if (s <= 4) - for (var h = 0; h < s; h++) { - var l = h % 2, - $ = h / 2; - (l = ~~l), ($ = ~~$); - var a = this.clipContextList[o++]; - (a.layoutChannelNo = n), - (a.layoutBounds.x = 0.5 * l), - (a.layoutBounds.y = 0.5 * $), - (a.layoutBounds.width = 0.5), - (a.layoutBounds.height = 0.5); - } - else if (s <= 9) - for (var h = 0; h < s; h++) { - var l = h % 3, - $ = h / 3; - (l = ~~l), ($ = ~~$); - var a = this.clipContextList[o++]; - (a.layoutChannelNo = n), - (a.layoutBounds.x = l / 3), - (a.layoutBounds.y = $ / 3), - (a.layoutBounds.width = 1 / 3), - (a.layoutBounds.height = 1 / 3); - } - else _._$li("_$6 _$0P mask count : %d", s); - } - }), - (r.prototype.addClippedDrawData = function (t, i) { - var e = new o(t, i); - this.clippedDrawContextList.push(e); - }), - (s._$JT = function (t, i, e) { - var r = t / i, - o = e / i, - n = o, - s = 1 - (1 - o) * (1 - o), - _ = 1 - (1 - n) * (1 - n), - a = - (1 / 3) * (1 - o) * s + - (n * (2 / 3) + (1 / 3) * (1 - n)) * (1 - s), - h = - (n + (2 / 3) * (1 - n)) * _ + - (o * (1 / 3) + (2 / 3) * (1 - o)) * (1 - _), - l = 1 - 3 * h + 3 * a - 0, - $ = 3 * h - 6 * a + 0, - u = 3 * a - 0; - if (r <= 0) return 0; - if (r >= 1) return 1; - var p = r, - f = p * p; - return l * (p * f) + $ * f + u * p + 0; - }), - (s.prototype._$a0 = function () {}), - (s.prototype.setFadeIn = function (t) { - this._$dP = t; - }), - (s.prototype.setFadeOut = function (t) { - this._$eo = t; - }), - (s.prototype._$pT = function (t) { - this._$V0 = t; - }), - (s.prototype.getFadeOut = function () { - return this._$eo; - }), - (s.prototype._$4T = function () { - return this._$eo; - }), - (s.prototype._$mT = function () { - return this._$V0; - }), - (s.prototype.getDurationMSec = function () { - return -1; - }), - (s.prototype.getLoopDurationMSec = function () { - return -1; - }), - (s.prototype.updateParam = function (t, i) { - if (i._$AT && !i._$9L) { - var e = w.getUserTimeMSec(); - if (i._$z2 < 0) { - (i._$z2 = e), (i._$bs = e); - var r = this.getDurationMSec(); - i._$Do < 0 && (i._$Do = r <= 0 ? -1 : i._$z2 + r); - } - var o = this._$V0; - (o = - o * - (0 == this._$dP ? 1 : ht._$r2((e - i._$bs) / this._$dP)) * - (0 == this._$eo || i._$Do < 0 - ? 1 - : ht._$r2((i._$Do - e) / this._$eo))), - (0 <= o && o <= 1) || console.log("### assert!! ### "), - this.updateParamExe(t, e, o, i), - i._$Do > 0 && i._$Do < e && (i._$9L = !0); - } - }), - (s.prototype.updateParamExe = function (t, i, e, r) {}), - (_._$8s = 0), - (_._$fT = new Object()), - (_.start = function (t) { - var i = _._$fT[t]; - null == i && ((i = new a()), (i._$r = t), (_._$fT[t] = i)), - (i._$0S = w.getSystemTimeMSec()); - }), - (_.dump = function (t) { - var i = _._$fT[t]; - if (null != i) { - var e = w.getSystemTimeMSec(), - r = e - i._$0S; - return console.log(t + " : " + r + "ms"), r; - } - return -1; - }), - (_.end = function (t) { - var i = _._$fT[t]; - if (null != i) { - return w.getSystemTimeMSec() - i._$0S; - } - return -1; - }), - (_._$li = function (t, i) { - console.log("_$li : " + t + "\n", i); - }), - (_._$Ji = function (t, i) { - console.log(t, i); - }), - (_._$dL = function (t, i) { - console.log(t, i), console.log("\n"); - }), - (_._$KL = function (t, i) { - for (var e = 0; e < i; e++) - e % 16 == 0 && e > 0 - ? console.log("\n") - : e % 8 == 0 && e > 0 && console.log(" "), - console.log("%02X ", 255 & t[e]); - console.log("\n"); - }), - (_._$nr = function (t, i, e) { - console.log("%s\n", t); - for (var r = i.length, o = 0; o < r; ++o) - console.log("%5d", i[o]), - console.log("%s\n", e), - console.log(","); - console.log("\n"); - }), - (_._$Rb = function (t) { - console.log("dump exception : " + t), - console.log("stack :: " + t.stack); - }), - (h.prototype._$8P = function () { - return 0.5 * (this.x + this.x + this.width); - }), - (h.prototype._$6P = function () { - return 0.5 * (this.y + this.y + this.height); - }), - (h.prototype._$EL = function () { - return this.x + this.width; - }), - (h.prototype._$5T = function () { - return this.y + this.height; - }), - (h.prototype._$jL = function (t, i, e, r) { - (this.x = t), (this.y = i), (this.width = e), (this.height = r); - }), - (h.prototype._$jL = function (t) { - (this.x = t.x), - (this.y = t.y), - (this.width = t.width), - (this.height = t.height); - }), - (l.prototype = new et()), - (l._$tP = new Object()), - (l._$27 = function () { - l._$tP.clear(); - }), - (l.getID = function (t) { - var i = l._$tP[t]; - return null == i && ((i = new l(t)), (l._$tP[t] = i)), i; - }), - (l.prototype._$3s = function () { - return new l(); - }), - (u.prototype = new et()), - (u._$tP = new Object()), - (u._$27 = function () { - u._$tP.clear(); - }), - (u.getID = function (t) { - var i = u._$tP[t]; - return null == i && ((i = new u(t)), (u._$tP[t] = i)), i; - }), - (u.prototype._$3s = function () { - return new u(); - }), - (p._$42 = 0), - (p.prototype._$zP = function () { - null == this._$vo && (this._$vo = new ot()), - null == this._$F2 && (this._$F2 = new Array()); - }), - (p.prototype.getCanvasWidth = function () { - return this._$ao; - }), - (p.prototype.getCanvasHeight = function () { - return this._$1S; - }), - (p.prototype._$F0 = function (t) { - (this._$vo = t._$nP()), - (this._$F2 = t._$nP()), - (this._$ao = t._$6L()), - (this._$1S = t._$6L()); - }), - (p.prototype._$6S = function (t) { - this._$F2.push(t); - }), - (p.prototype._$Xr = function () { - return this._$F2; - }), - (p.prototype._$E2 = function () { - return this._$vo; - }), - (f.prototype.setup = function (t, i, e) { - (this._$ks = this._$Yb()), - this.p2._$xT(), - 3 == arguments.length && - ((this._$Fo = t), - (this._$L2 = i), - (this.p1._$p = e), - (this.p2._$p = e), - (this.p2.y = t), - this.setup()); - }), - (f.prototype.getPhysicsPoint1 = function () { - return this.p1; - }), - (f.prototype.getPhysicsPoint2 = function () { - return this.p2; - }), - (f.prototype._$qr = function () { - return this._$Db; - }), - (f.prototype._$pr = function (t) { - this._$Db = t; - }), - (f.prototype._$5r = function () { - return this._$M2; - }), - (f.prototype._$Cs = function () { - return this._$9b; - }), - (f.prototype._$Yb = function () { - return ( - (-180 * - Math.atan2(this.p1.x - this.p2.x, -(this.p1.y - this.p2.y))) / - Math.PI - ); - }), - (f.prototype.addSrcParam = function (t, i, e, r) { - var o = new g(t, i, e, r); - this._$lL.push(o); - }), - (f.prototype.addTargetParam = function (t, i, e, r) { - var o = new T(t, i, e, r); - this._$qP.push(o); - }), - (f.prototype.update = function (t, i) { - if (0 == this._$iP) - return ( - (this._$iP = this._$iT = i), - void (this._$Fo = Math.sqrt( - (this.p1.x - this.p2.x) * (this.p1.x - this.p2.x) + - (this.p1.y - this.p2.y) * (this.p1.y - this.p2.y) - )) - ); - var e = (i - this._$iT) / 1e3; - if (0 != e) { - for (var r = this._$lL.length - 1; r >= 0; --r) { - this._$lL[r]._$oP(t, this); - } - this._$oo(t, e), - (this._$M2 = this._$Yb()), - (this._$9b = (this._$M2 - this._$ks) / e), - (this._$ks = this._$M2); - } - for (var r = this._$qP.length - 1; r >= 0; --r) { - this._$qP[r]._$YS(t, this); - } - this._$iT = i; - }), - (f.prototype._$oo = function (t, i) { - i < 0.033 && (i = 0.033); - var e = 1 / i; - (this.p1.vx = (this.p1.x - this.p1._$s0) * e), - (this.p1.vy = (this.p1.y - this.p1._$70) * e), - (this.p1.ax = (this.p1.vx - this.p1._$7L) * e), - (this.p1.ay = (this.p1.vy - this.p1._$HL) * e), - (this.p1.fx = this.p1.ax * this.p1._$p), - (this.p1.fy = this.p1.ay * this.p1._$p), - this.p1._$xT(); - var r, - o, - n = -Math.atan2(this.p1.y - this.p2.y, this.p1.x - this.p2.x), - s = Math.cos(n), - _ = Math.sin(n), - a = 9.8 * this.p2._$p, - h = this._$Db * Lt._$bS, - l = a * Math.cos(n - h); - (r = l * _), (o = l * s); - var $ = -this.p1.fx * _ * _, - u = -this.p1.fy * _ * s, - p = -this.p2.vx * this._$L2, - f = -this.p2.vy * this._$L2; - (this.p2.fx = r + $ + p), - (this.p2.fy = o + u + f), - (this.p2.ax = this.p2.fx / this.p2._$p), - (this.p2.ay = this.p2.fy / this.p2._$p), - (this.p2.vx += this.p2.ax * i), - (this.p2.vy += this.p2.ay * i), - (this.p2.x += this.p2.vx * i), - (this.p2.y += this.p2.vy * i); - var c = Math.sqrt( - (this.p1.x - this.p2.x) * (this.p1.x - this.p2.x) + - (this.p1.y - this.p2.y) * (this.p1.y - this.p2.y) - ); - (this.p2.x = this.p1.x + (this._$Fo * (this.p2.x - this.p1.x)) / c), - (this.p2.y = - this.p1.y + (this._$Fo * (this.p2.y - this.p1.y)) / c), - (this.p2.vx = (this.p2.x - this.p2._$s0) * e), - (this.p2.vy = (this.p2.y - this.p2._$70) * e), - this.p2._$xT(); - }), - (c.prototype._$xT = function () { - (this._$s0 = this.x), - (this._$70 = this.y), - (this._$7L = this.vx), - (this._$HL = this.vy); - }), - (d.prototype._$oP = function (t, i) {}), - (g.prototype = new d()), - (g.prototype._$oP = function (t, i) { - var e = this.scale * t.getParamFloat(this._$wL), - r = i.getPhysicsPoint1(); - switch (this._$tL) { - default: - case f.Src.SRC_TO_X: - r.x = r.x + (e - r.x) * this._$V0; - break; - case f.Src.SRC_TO_Y: - r.y = r.y + (e - r.y) * this._$V0; - break; - case f.Src.SRC_TO_G_ANGLE: - var o = i._$qr(); - (o += (e - o) * this._$V0), i._$pr(o); - } - }), - (y.prototype._$YS = function (t, i) {}), - (T.prototype = new y()), - (T.prototype._$YS = function (t, i) { - switch (this._$YP) { - default: - case f.Target.TARGET_FROM_ANGLE: - t.setParamFloat(this._$wL, this.scale * i._$5r(), this._$V0); - break; - case f.Target.TARGET_FROM_ANGLE_V: - t.setParamFloat(this._$wL, this.scale * i._$Cs(), this._$V0); - } - }), - (f.Src = function () {}), - (f.Src.SRC_TO_X = "SRC_TO_X"), - (f.Src.SRC_TO_Y = "SRC_TO_Y"), - (f.Src.SRC_TO_G_ANGLE = "SRC_TO_G_ANGLE"), - (f.Target = function () {}), - (f.Target.TARGET_FROM_ANGLE = "TARGET_FROM_ANGLE"), - (f.Target.TARGET_FROM_ANGLE_V = "TARGET_FROM_ANGLE_V"), - (P.prototype.init = function (t) { - (this._$fL = t._$fL), - (this._$gL = t._$gL), - (this._$B0 = t._$B0), - (this._$z0 = t._$z0), - (this._$qT = t._$qT), - (this.reflectX = t.reflectX), - (this.reflectY = t.reflectY); - }), - (P.prototype._$F0 = function (t) { - (this._$fL = t._$_T()), - (this._$gL = t._$_T()), - (this._$B0 = t._$_T()), - (this._$z0 = t._$_T()), - (this._$qT = t._$_T()), - t.getFormatVersion() >= G.LIVE2D_FORMAT_VERSION_V2_10_SDK2 && - ((this.reflectX = t._$po()), (this.reflectY = t._$po())); - }), - (P.prototype._$e = function () {}); - var It = function () {}; - (It._$ni = function (t, i, e, r, o, n, s, _, a) { - var h = s * n - _ * o; - if (0 == h) return null; - var l, - $ = ((t - e) * n - (i - r) * o) / h; - return ( - (l = 0 != o ? (t - e - $ * s) / o : (i - r - $ * _) / n), - isNaN(l) && - ((l = (t - e - $ * s) / o), - isNaN(l) && (l = (i - r - $ * _) / n), - isNaN(l) && - (console.log("a is NaN @UtVector#_$ni() "), - console.log("v1x : " + o), - console.log("v1x != 0 ? " + (0 != o)))), - null == a ? new Array(l, $) : ((a[0] = l), (a[1] = $), a) - ); - }), - (S.prototype._$8P = function () { - return this.x + 0.5 * this.width; - }), - (S.prototype._$6P = function () { - return this.y + 0.5 * this.height; - }), - (S.prototype._$EL = function () { - return this.x + this.width; - }), - (S.prototype._$5T = function () { - return this.y + this.height; - }), - (S.prototype._$jL = function (t, i, e, r) { - (this.x = t), (this.y = i), (this.width = e), (this.height = r); - }), - (S.prototype._$jL = function (t) { - (this.x = t.x), - (this.y = t.y), - (this.width = t.width), - (this.height = t.height); - }), - (S.prototype.contains = function (t, i) { - return ( - this.x <= this.x && - this.y <= this.y && - this.x <= this.x + this.width && - this.y <= this.y + this.height - ); - }), - (S.prototype.expand = function (t, i) { - (this.x -= t), - (this.y -= i), - (this.width += 2 * t), - (this.height += 2 * i); - }), - (v._$Z2 = function (t, i, e, r) { - var o = i._$Q2(t, e), - n = t._$vs(), - s = t._$Tr(); - if ((i._$zr(n, s, o), o <= 0)) return r[n[0]]; - if (1 == o) { - var _ = r[n[0]], - a = r[n[1]], - h = s[0]; - return (_ + (a - _) * h) | 0; - } - if (2 == o) { - var _ = r[n[0]], - a = r[n[1]], - l = r[n[2]], - $ = r[n[3]], - h = s[0], - u = s[1], - p = (_ + (a - _) * h) | 0, - f = (l + ($ - l) * h) | 0; - return (p + (f - p) * u) | 0; - } - if (3 == o) { - var c = r[n[0]], - d = r[n[1]], - g = r[n[2]], - y = r[n[3]], - m = r[n[4]], - T = r[n[5]], - P = r[n[6]], - S = r[n[7]], - h = s[0], - u = s[1], - v = s[2], - _ = (c + (d - c) * h) | 0, - a = (g + (y - g) * h) | 0, - l = (m + (T - m) * h) | 0, - $ = (P + (S - P) * h) | 0, - p = (_ + (a - _) * u) | 0, - f = (l + ($ - l) * u) | 0; - return (p + (f - p) * v) | 0; - } - if (4 == o) { - var L = r[n[0]], - M = r[n[1]], - E = r[n[2]], - A = r[n[3]], - I = r[n[4]], - w = r[n[5]], - x = r[n[6]], - O = r[n[7]], - D = r[n[8]], - R = r[n[9]], - b = r[n[10]], - F = r[n[11]], - C = r[n[12]], - N = r[n[13]], - B = r[n[14]], - U = r[n[15]], - h = s[0], - u = s[1], - v = s[2], - G = s[3], - c = (L + (M - L) * h) | 0, - d = (E + (A - E) * h) | 0, - g = (I + (w - I) * h) | 0, - y = (x + (O - x) * h) | 0, - m = (D + (R - D) * h) | 0, - T = (b + (F - b) * h) | 0, - P = (C + (N - C) * h) | 0, - S = (B + (U - B) * h) | 0, - _ = (c + (d - c) * u) | 0, - a = (g + (y - g) * u) | 0, - l = (m + (T - m) * u) | 0, - $ = (P + (S - P) * u) | 0, - p = (_ + (a - _) * v) | 0, - f = (l + ($ - l) * v) | 0; - return (p + (f - p) * G) | 0; - } - for (var Y = 1 << o, k = new Float32Array(Y), V = 0; V < Y; V++) { - for (var X = V, z = 1, H = 0; H < o; H++) - (z *= X % 2 == 0 ? 1 - s[H] : s[H]), (X /= 2); - k[V] = z; - } - for (var W = new Float32Array(Y), j = 0; j < Y; j++) W[j] = r[n[j]]; - for (var q = 0, j = 0; j < Y; j++) q += k[j] * W[j]; - return (q + 0.5) | 0; - }), - (v._$br = function (t, i, e, r) { - var o = i._$Q2(t, e), - n = t._$vs(), - s = t._$Tr(); - if ((i._$zr(n, s, o), o <= 0)) return r[n[0]]; - if (1 == o) { - var _ = r[n[0]], - a = r[n[1]], - h = s[0]; - return _ + (a - _) * h; - } - if (2 == o) { - var _ = r[n[0]], - a = r[n[1]], - l = r[n[2]], - $ = r[n[3]], - h = s[0], - u = s[1]; - return (1 - u) * (_ + (a - _) * h) + u * (l + ($ - l) * h); - } - if (3 == o) { - var p = r[n[0]], - f = r[n[1]], - c = r[n[2]], - d = r[n[3]], - g = r[n[4]], - y = r[n[5]], - m = r[n[6]], - T = r[n[7]], - h = s[0], - u = s[1], - P = s[2]; - return ( - (1 - P) * - ((1 - u) * (p + (f - p) * h) + u * (c + (d - c) * h)) + - P * ((1 - u) * (g + (y - g) * h) + u * (m + (T - m) * h)) - ); - } - if (4 == o) { - var S = r[n[0]], - v = r[n[1]], - L = r[n[2]], - M = r[n[3]], - E = r[n[4]], - A = r[n[5]], - I = r[n[6]], - w = r[n[7]], - x = r[n[8]], - O = r[n[9]], - D = r[n[10]], - R = r[n[11]], - b = r[n[12]], - F = r[n[13]], - C = r[n[14]], - N = r[n[15]], - h = s[0], - u = s[1], - P = s[2], - B = s[3]; - return ( - (1 - B) * - ((1 - P) * - ((1 - u) * (S + (v - S) * h) + u * (L + (M - L) * h)) + - P * ((1 - u) * (E + (A - E) * h) + u * (I + (w - I) * h))) + - B * - ((1 - P) * - ((1 - u) * (x + (O - x) * h) + u * (D + (R - D) * h)) + - P * ((1 - u) * (b + (F - b) * h) + u * (C + (N - C) * h))) - ); - } - for (var U = 1 << o, G = new Float32Array(U), Y = 0; Y < U; Y++) { - for (var k = Y, V = 1, X = 0; X < o; X++) - (V *= k % 2 == 0 ? 1 - s[X] : s[X]), (k /= 2); - G[Y] = V; - } - for (var z = new Float32Array(U), H = 0; H < U; H++) z[H] = r[n[H]]; - for (var W = 0, H = 0; H < U; H++) W += G[H] * z[H]; - return W; - }), - (v._$Vr = function (t, i, e, r, o, n, s, _) { - var a = i._$Q2(t, e), - h = t._$vs(), - l = t._$Tr(); - i._$zr(h, l, a); - var $ = 2 * r, - u = s; - if (a <= 0) { - var p = h[0], - f = o[p]; - if (2 == _ && 0 == s) w._$jT(f, 0, n, 0, $); - else - for (var c = 0; c < $; ) - (n[u] = f[c++]), (n[u + 1] = f[c++]), (u += _); - } else if (1 == a) - for ( - var f = o[h[0]], d = o[h[1]], g = l[0], y = 1 - g, c = 0; - c < $; - ) - (n[u] = f[c] * y + d[c] * g), - ++c, - (n[u + 1] = f[c] * y + d[c] * g), - ++c, - (u += _); - else if (2 == a) - for ( - var f = o[h[0]], - d = o[h[1]], - m = o[h[2]], - T = o[h[3]], - g = l[0], - P = l[1], - y = 1 - g, - S = 1 - P, - v = S * y, - L = S * g, - M = P * y, - E = P * g, - c = 0; - c < $; - - ) - (n[u] = v * f[c] + L * d[c] + M * m[c] + E * T[c]), - ++c, - (n[u + 1] = v * f[c] + L * d[c] + M * m[c] + E * T[c]), - ++c, - (u += _); - else if (3 == a) - for ( - var A = o[h[0]], - I = o[h[1]], - x = o[h[2]], - O = o[h[3]], - D = o[h[4]], - R = o[h[5]], - b = o[h[6]], - F = o[h[7]], - g = l[0], - P = l[1], - C = l[2], - y = 1 - g, - S = 1 - P, - N = 1 - C, - B = N * S * y, - U = N * S * g, - G = N * P * y, - Y = N * P * g, - k = C * S * y, - V = C * S * g, - X = C * P * y, - z = C * P * g, - c = 0; - c < $; - - ) - (n[u] = - B * A[c] + - U * I[c] + - G * x[c] + - Y * O[c] + - k * D[c] + - V * R[c] + - X * b[c] + - z * F[c]), - ++c, - (n[u + 1] = - B * A[c] + - U * I[c] + - G * x[c] + - Y * O[c] + - k * D[c] + - V * R[c] + - X * b[c] + - z * F[c]), - ++c, - (u += _); - else if (4 == a) - for ( - var H = o[h[0]], - W = o[h[1]], - j = o[h[2]], - q = o[h[3]], - J = o[h[4]], - Q = o[h[5]], - Z = o[h[6]], - K = o[h[7]], - tt = o[h[8]], - it = o[h[9]], - et = o[h[10]], - rt = o[h[11]], - ot = o[h[12]], - nt = o[h[13]], - st = o[h[14]], - _t = o[h[15]], - g = l[0], - P = l[1], - C = l[2], - at = l[3], - y = 1 - g, - S = 1 - P, - N = 1 - C, - ht = 1 - at, - lt = ht * N * S * y, - $t = ht * N * S * g, - ut = ht * N * P * y, - pt = ht * N * P * g, - ft = ht * C * S * y, - ct = ht * C * S * g, - dt = ht * C * P * y, - gt = ht * C * P * g, - yt = at * N * S * y, - mt = at * N * S * g, - Tt = at * N * P * y, - Pt = at * N * P * g, - St = at * C * S * y, - vt = at * C * S * g, - Lt = at * C * P * y, - Mt = at * C * P * g, - c = 0; - c < $; - - ) - (n[u] = - lt * H[c] + - $t * W[c] + - ut * j[c] + - pt * q[c] + - ft * J[c] + - ct * Q[c] + - dt * Z[c] + - gt * K[c] + - yt * tt[c] + - mt * it[c] + - Tt * et[c] + - Pt * rt[c] + - St * ot[c] + - vt * nt[c] + - Lt * st[c] + - Mt * _t[c]), - ++c, - (n[u + 1] = - lt * H[c] + - $t * W[c] + - ut * j[c] + - pt * q[c] + - ft * J[c] + - ct * Q[c] + - dt * Z[c] + - gt * K[c] + - yt * tt[c] + - mt * it[c] + - Tt * et[c] + - Pt * rt[c] + - St * ot[c] + - vt * nt[c] + - Lt * st[c] + - Mt * _t[c]), - ++c, - (u += _); - else { - for ( - var Et = 1 << a, At = new Float32Array(Et), It = 0; - It < Et; - It++ - ) { - for (var wt = It, xt = 1, Ot = 0; Ot < a; Ot++) - (xt *= wt % 2 == 0 ? 1 - l[Ot] : l[Ot]), (wt /= 2); - At[It] = xt; - } - for (var Dt = new Float32Array(Et), Rt = 0; Rt < Et; Rt++) - Dt[Rt] = o[h[Rt]]; - for (var c = 0; c < $; ) { - for (var bt = 0, Ft = 0, Ct = c + 1, Rt = 0; Rt < Et; Rt++) - (bt += At[Rt] * Dt[Rt][c]), (Ft += At[Rt] * Dt[Rt][Ct]); - (c += 2), (n[u] = bt), (n[u + 1] = Ft), (u += _); - } - } - }), - (L.prototype._$HT = function (t, i) { - (this.x = t), (this.y = i); - }), - (L.prototype._$HT = function (t) { - (this.x = t.x), (this.y = t.y); - }), - (M._$ur = -2), - (M._$ES = 500), - (M._$wb = 2), - (M._$8S = 3), - (M._$52 = M._$ES), - (M._$R2 = M._$ES), - (M._$or = function () { - return M._$52; - }), - (M._$Pr = function () { - return M._$R2; - }), - (M.prototype.convertClipIDForV2_11 = function (t) { - var i = []; - return null == t - ? null - : 0 == t.length - ? null - : /,/.test(t) - ? (i = t.id.split(",")) - : (i.push(t.id), i); - }), - (M.prototype._$F0 = function (t) { - (this._$gP = t._$nP()), - (this._$dr = t._$nP()), - (this._$GS = t._$nP()), - (this._$qb = t._$6L()), - (this._$Lb = t._$cS()), - (this._$mS = t._$Tb()), - t.getFormatVersion() >= G._$T7 - ? ((this.clipID = t._$nP()), - (this.clipIDList = this.convertClipIDForV2_11(this.clipID))) - : (this.clipIDList = []), - this._$MS(this._$Lb); - }), - (M.prototype.getClipIDList = function () { - return this.clipIDList; - }), - (M.prototype.init = function (t) {}), - (M.prototype._$Nr = function (t, i) { - if ( - ((i._$IS[0] = !1), - (i._$Us = v._$Z2(t, this._$GS, i._$IS, this._$Lb)), - at._$Zs) - ); - else if (i._$IS[0]) return; - i._$7s = v._$br(t, this._$GS, i._$IS, this._$mS); - }), - (M.prototype._$2b = function (t, i) {}), - (M.prototype.getDrawDataID = function () { - return this._$gP; - }), - (M.prototype._$j2 = function (t) { - this._$gP = t; - }), - (M.prototype.getOpacity = function (t, i) { - return i._$7s; - }), - (M.prototype._$zS = function (t, i) { - return i._$Us; - }), - (M.prototype._$MS = function (t) { - for (var i = t.length - 1; i >= 0; --i) { - var e = t[i]; - e < M._$52 ? (M._$52 = e) : e > M._$R2 && (M._$R2 = e); - } - }), - (M.prototype.getTargetBaseDataID = function () { - return this._$dr; - }), - (M.prototype._$gs = function (t) { - this._$dr = t; - }), - (M.prototype._$32 = function () { - return null != this._$dr && this._$dr != yt._$2o(); - }), - (M.prototype.preDraw = function (t, i, e) {}), - (M.prototype.draw = function (t, i, e) {}), - (M.prototype.getType = function () {}), - (M.prototype._$B2 = function (t, i, e) {}), - (E._$ps = 32), - (E.CLIPPING_PROCESS_NONE = 0), - (E.CLIPPING_PROCESS_OVERWRITE_ALPHA = 1), - (E.CLIPPING_PROCESS_MULTIPLY_ALPHA = 2), - (E.CLIPPING_PROCESS_DRAW = 3), - (E.CLIPPING_PROCESS_CLEAR_ALPHA = 4), - (E.prototype.setChannelFlagAsColor = function (t, i) { - this.CHANNEL_COLORS[t] = i; - }), - (E.prototype.getChannelFlagAsColor = function (t) { - return this.CHANNEL_COLORS[t]; - }), - (E.prototype._$ZT = function () {}), - (E.prototype._$Uo = function (t, i, e, r, o, n, s) {}), - (E.prototype._$Rs = function () { - return -1; - }), - (E.prototype._$Ds = function (t) {}), - (E.prototype.setBaseColor = function (t, i, e, r) { - t < 0 ? (t = 0) : t > 1 && (t = 1), - i < 0 ? (i = 0) : i > 1 && (i = 1), - e < 0 ? (e = 0) : e > 1 && (e = 1), - r < 0 ? (r = 0) : r > 1 && (r = 1), - (this._$lT = t), - (this._$C0 = i), - (this._$tT = e), - (this._$WL = r); - }), - (E.prototype._$WP = function (t) { - this.culling = t; - }), - (E.prototype.setMatrix = function (t) { - for (var i = 0; i < 16; i++) this.matrix4x4[i] = t[i]; - }), - (E.prototype._$IT = function () { - return this.matrix4x4; - }), - (E.prototype.setPremultipliedAlpha = function (t) { - this.premultipliedAlpha = t; - }), - (E.prototype.isPremultipliedAlpha = function () { - return this.premultipliedAlpha; - }), - (E.prototype.setAnisotropy = function (t) { - this.anisotropy = t; - }), - (E.prototype.getAnisotropy = function () { - return this.anisotropy; - }), - (E.prototype.getClippingProcess = function () { - return this.clippingProcess; - }), - (E.prototype.setClippingProcess = function (t) { - this.clippingProcess = t; - }), - (E.prototype.setClipBufPre_clipContextForMask = function (t) { - this.clipBufPre_clipContextMask = t; - }), - (E.prototype.getClipBufPre_clipContextMask = function () { - return this.clipBufPre_clipContextMask; - }), - (E.prototype.setClipBufPre_clipContextForDraw = function (t) { - this.clipBufPre_clipContextDraw = t; - }), - (E.prototype.getClipBufPre_clipContextDraw = function () { - return this.clipBufPre_clipContextDraw; - }), - (I._$ur = -2), - (I._$c2 = 1), - (I._$_b = 2), - (I.prototype._$F0 = function (t) { - (this._$kP = t._$nP()), (this._$dr = t._$nP()); - }), - (I.prototype.readV2_opacity = function (t) { - t.getFormatVersion() >= G.LIVE2D_FORMAT_VERSION_V2_10_SDK2 && - (this._$mS = t._$Tb()); - }), - (I.prototype.init = function (t) {}), - (I.prototype._$Nr = function (t, i) {}), - (I.prototype.interpolateOpacity = function (t, i, e, r) { - null == this._$mS - ? e.setInterpolatedOpacity(1) - : e.setInterpolatedOpacity(v._$br(t, i, r, this._$mS)); - }), - (I.prototype._$2b = function (t, i) {}), - (I.prototype._$nb = function (t, i, e, r, o, n, s) {}), - (I.prototype.getType = function () {}), - (I.prototype._$gs = function (t) { - this._$dr = t; - }), - (I.prototype._$a2 = function (t) { - this._$kP = t; - }), - (I.prototype.getTargetBaseDataID = function () { - return this._$dr; - }), - (I.prototype.getBaseDataID = function () { - return this._$kP; - }), - (I.prototype._$32 = function () { - return null != this._$dr && this._$dr != yt._$2o(); - }), - (w._$W2 = 0), - (w._$CS = w._$W2), - (w._$Mo = function () { - return !0; - }), - (w._$XP = function (t) { - try { - for (var i = getTimeMSec(); getTimeMSec() - i < t; ); - } catch (t) { - t._$Rb(); - } - }), - (w.getUserTimeMSec = function () { - return w._$CS == w._$W2 ? w.getSystemTimeMSec() : w._$CS; - }), - (w.setUserTimeMSec = function (t) { - w._$CS = t; - }), - (w.updateUserTimeMSec = function () { - return (w._$CS = w.getSystemTimeMSec()); - }), - (w.getTimeMSec = function () { - return new Date().getTime(); - }), - (w.getSystemTimeMSec = function () { - return new Date().getTime(); - }), - (w._$Q = function (t) {}), - (w._$jT = function (t, i, e, r, o) { - for (var n = 0; n < o; n++) e[r + n] = t[i + n]; - }), - (x._$ds = -2), - (x.prototype._$F0 = function (t) { - (this._$wL = t._$nP()), - (this._$VP = t._$6L()), - (this._$GP = t._$nP()); - }), - (x.prototype.getParamIndex = function (t) { - return this._$2r != t && (this._$8o = x._$ds), this._$8o; - }), - (x.prototype._$Pb = function (t, i) { - (this._$8o = t), (this._$2r = i); - }), - (x.prototype.getParamID = function () { - return this._$wL; - }), - (x.prototype._$yP = function (t) { - this._$wL = t; - }), - (x.prototype._$N2 = function () { - return this._$VP; - }), - (x.prototype._$d2 = function () { - return this._$GP; - }), - (x.prototype._$t2 = function (t, i) { - (this._$VP = t), (this._$GP = i); - }), - (x.prototype._$Lr = function () { - return this._$O2; - }), - (x.prototype._$wr = function (t) { - this._$O2 = t; - }), - (x.prototype._$SL = function () { - return this._$ri; - }), - (x.prototype._$AL = function (t) { - this._$ri = t; - }), - (O.startsWith = function (t, i, e) { - var r = i + e.length; - if (r >= t.length) return !1; - for (var o = i; o < r; o++) - if (O.getChar(t, o) != e.charAt(o - i)) return !1; - return !0; - }), - (O.getChar = function (t, i) { - return String.fromCharCode(t.getUint8(i)); - }), - (O.createString = function (t, i, e) { - for ( - var r = new ArrayBuffer(2 * e), o = new Uint16Array(r), n = 0; - n < e; - n++ - ) - o[n] = t.getUint8(i + n); - return String.fromCharCode.apply(null, o); - }), - (O._$LS = function (t, i, e, r) { - t instanceof ArrayBuffer && (t = new DataView(t)); - var o = e, - n = !1, - s = !1, - _ = 0, - a = O.getChar(t, o); - "-" == a && ((n = !0), o++); - for (var h = !1; o < i; o++) { - switch ((a = O.getChar(t, o))) { - case "0": - _ *= 10; - break; - case "1": - _ = 10 * _ + 1; - break; - case "2": - _ = 10 * _ + 2; - break; - case "3": - _ = 10 * _ + 3; - break; - case "4": - _ = 10 * _ + 4; - break; - case "5": - _ = 10 * _ + 5; - break; - case "6": - _ = 10 * _ + 6; - break; - case "7": - _ = 10 * _ + 7; - break; - case "8": - _ = 10 * _ + 8; - break; - case "9": - _ = 10 * _ + 9; - break; - case ".": - (s = !0), o++, (h = !0); - break; - default: - h = !0; - } - if (h) break; - } - if (s) - for (var l = 0.1, $ = !1; o < i; o++) { - switch ((a = O.getChar(t, o))) { - case "0": - break; - case "1": - _ += 1 * l; - break; - case "2": - _ += 2 * l; - break; - case "3": - _ += 3 * l; - break; - case "4": - _ += 4 * l; - break; - case "5": - _ += 5 * l; - break; - case "6": - _ += 6 * l; - break; - case "7": - _ += 7 * l; - break; - case "8": - _ += 8 * l; - break; - case "9": - _ += 9 * l; - break; - default: - $ = !0; - } - if (((l *= 0.1), $)) break; - } - return n && (_ = -_), (r[0] = o), _; - }), - (D.prototype._$zP = function () { - this._$Ob = new Array(); - }), - (D.prototype._$F0 = function (t) { - this._$Ob = t._$nP(); - }), - (D.prototype._$Ur = function (t) { - if (t._$WS()) return !0; - for (var i = t._$v2(), e = this._$Ob.length - 1; e >= 0; --e) { - var r = this._$Ob[e].getParamIndex(i); - if ( - (r == x._$ds && - (r = t.getParamIndex(this._$Ob[e].getParamID())), - t._$Xb(r)) - ) - return !0; - } - return !1; - }), - (D.prototype._$Q2 = function (t, i) { - for ( - var e, r, o = this._$Ob.length, n = t._$v2(), s = 0, _ = 0; - _ < o; - _++ - ) { - var a = this._$Ob[_]; - if ( - ((e = a.getParamIndex(n)), - e == x._$ds && - ((e = t.getParamIndex(a.getParamID())), a._$Pb(e, n)), - e < 0) - ) - throw new Exception("err 23242 : " + a.getParamID()); - var h = e < 0 ? 0 : t.getParamFloat(e); - r = a._$N2(); - var l, - $, - u = a._$d2(), - p = -1, - f = 0; - if (r < 1); - else if (1 == r) - (l = u[0]), - l - U._$J < h && h < l + U._$J - ? ((p = 0), (f = 0)) - : ((p = 0), (i[0] = !0)); - else if (((l = u[0]), h < l - U._$J)) (p = 0), (i[0] = !0); - else if (h < l + U._$J) p = 0; - else { - for (var c = !1, d = 1; d < r; ++d) { - if ((($ = u[d]), h < $ + U._$J)) { - $ - U._$J < h - ? (p = d) - : ((p = d - 1), (f = (h - l) / ($ - l)), s++), - (c = !0); - break; - } - l = $; - } - c || ((p = r - 1), (f = 0), (i[0] = !0)); - } - a._$wr(p), a._$AL(f); - } - return s; - }), - (D.prototype._$zr = function (t, i, e) { - var r = 1 << e; - r + 1 > U._$Qb && console.log("err 23245\n"); - for ( - var o = this._$Ob.length, n = 1, s = 1, _ = 0, a = 0; - a < r; - ++a - ) - t[a] = 0; - for (var h = 0; h < o; ++h) { - var l = this._$Ob[h]; - if (0 == l._$SL()) { - var $ = l._$Lr() * n; - if ($ < 0 && at._$3T) throw new Exception("err 23246"); - for (var a = 0; a < r; ++a) t[a] += $; - } else { - for ( - var $ = n * l._$Lr(), u = n * (l._$Lr() + 1), a = 0; - a < r; - ++a - ) - t[a] += ((a / s) | 0) % 2 == 0 ? $ : u; - (i[_++] = l._$SL()), (s *= 2); - } - n *= l._$N2(); - } - (t[r] = 65535), (i[_] = -1); - }), - (D.prototype._$h2 = function (t, i, e) { - for (var r = new Float32Array(i), o = 0; o < i; ++o) r[o] = e[o]; - var n = new x(); - n._$yP(t), n._$t2(i, r), this._$Ob.push(n); - }), - (D.prototype._$J2 = function (t) { - for (var i = t, e = this._$Ob.length, r = 0; r < e; ++r) { - var o = this._$Ob[r], - n = o._$N2(), - s = i % o._$N2(), - _ = o._$d2()[s]; - console.log("%s[%d]=%7.2f / ", o.getParamID(), s, _), (i /= n); - } - console.log("\n"); - }), - (D.prototype.getParamCount = function () { - return this._$Ob.length; - }), - (D.prototype._$zs = function () { - return this._$Ob; - }), - (R.prototype.identity = function () { - for (var t = 0; t < 16; t++) this.m[t] = t % 5 == 0 ? 1 : 0; - }), - (R.prototype.getArray = function () { - return this.m; - }), - (R.prototype.getCopyMatrix = function () { - return new Float32Array(this.m); - }), - (R.prototype.setMatrix = function (t) { - if (null != t && 16 == t.length) - for (var i = 0; i < 16; i++) this.m[i] = t[i]; - }), - (R.prototype.mult = function (t, i, e) { - return null == i - ? null - : (this == i - ? this.mult_safe(this.m, t.m, i.m, e) - : this.mult_fast(this.m, t.m, i.m, e), - i); - }), - (R.prototype.mult_safe = function (t, i, e, r) { - if (t == e) { - var o = new Array(16); - this.mult_fast(t, i, o, r); - for (var n = 15; n >= 0; --n) e[n] = o[n]; - } else this.mult_fast(t, i, e, r); - }), - (R.prototype.mult_fast = function (t, i, e, r) { - r - ? ((e[0] = t[0] * i[0] + t[4] * i[1] + t[8] * i[2]), - (e[4] = t[0] * i[4] + t[4] * i[5] + t[8] * i[6]), - (e[8] = t[0] * i[8] + t[4] * i[9] + t[8] * i[10]), - (e[12] = t[0] * i[12] + t[4] * i[13] + t[8] * i[14] + t[12]), - (e[1] = t[1] * i[0] + t[5] * i[1] + t[9] * i[2]), - (e[5] = t[1] * i[4] + t[5] * i[5] + t[9] * i[6]), - (e[9] = t[1] * i[8] + t[5] * i[9] + t[9] * i[10]), - (e[13] = t[1] * i[12] + t[5] * i[13] + t[9] * i[14] + t[13]), - (e[2] = t[2] * i[0] + t[6] * i[1] + t[10] * i[2]), - (e[6] = t[2] * i[4] + t[6] * i[5] + t[10] * i[6]), - (e[10] = t[2] * i[8] + t[6] * i[9] + t[10] * i[10]), - (e[14] = t[2] * i[12] + t[6] * i[13] + t[10] * i[14] + t[14]), - (e[3] = e[7] = e[11] = 0), - (e[15] = 1)) - : ((e[0] = - t[0] * i[0] + t[4] * i[1] + t[8] * i[2] + t[12] * i[3]), - (e[4] = t[0] * i[4] + t[4] * i[5] + t[8] * i[6] + t[12] * i[7]), - (e[8] = - t[0] * i[8] + t[4] * i[9] + t[8] * i[10] + t[12] * i[11]), - (e[12] = - t[0] * i[12] + t[4] * i[13] + t[8] * i[14] + t[12] * i[15]), - (e[1] = t[1] * i[0] + t[5] * i[1] + t[9] * i[2] + t[13] * i[3]), - (e[5] = t[1] * i[4] + t[5] * i[5] + t[9] * i[6] + t[13] * i[7]), - (e[9] = - t[1] * i[8] + t[5] * i[9] + t[9] * i[10] + t[13] * i[11]), - (e[13] = - t[1] * i[12] + t[5] * i[13] + t[9] * i[14] + t[13] * i[15]), - (e[2] = - t[2] * i[0] + t[6] * i[1] + t[10] * i[2] + t[14] * i[3]), - (e[6] = - t[2] * i[4] + t[6] * i[5] + t[10] * i[6] + t[14] * i[7]), - (e[10] = - t[2] * i[8] + t[6] * i[9] + t[10] * i[10] + t[14] * i[11]), - (e[14] = - t[2] * i[12] + t[6] * i[13] + t[10] * i[14] + t[14] * i[15]), - (e[3] = - t[3] * i[0] + t[7] * i[1] + t[11] * i[2] + t[15] * i[3]), - (e[7] = - t[3] * i[4] + t[7] * i[5] + t[11] * i[6] + t[15] * i[7]), - (e[11] = - t[3] * i[8] + t[7] * i[9] + t[11] * i[10] + t[15] * i[11]), - (e[15] = - t[3] * i[12] + t[7] * i[13] + t[11] * i[14] + t[15] * i[15])); - }), - (R.prototype.translate = function (t, i, e) { - (this.m[12] = - this.m[0] * t + this.m[4] * i + this.m[8] * e + this.m[12]), - (this.m[13] = - this.m[1] * t + this.m[5] * i + this.m[9] * e + this.m[13]), - (this.m[14] = - this.m[2] * t + this.m[6] * i + this.m[10] * e + this.m[14]), - (this.m[15] = - this.m[3] * t + this.m[7] * i + this.m[11] * e + this.m[15]); - }), - (R.prototype.scale = function (t, i, e) { - (this.m[0] *= t), - (this.m[4] *= i), - (this.m[8] *= e), - (this.m[1] *= t), - (this.m[5] *= i), - (this.m[9] *= e), - (this.m[2] *= t), - (this.m[6] *= i), - (this.m[10] *= e), - (this.m[3] *= t), - (this.m[7] *= i), - (this.m[11] *= e); - }), - (R.prototype.rotateX = function (t) { - var i = Lt.fcos(t), - e = Lt._$9(t), - r = this.m[4]; - (this.m[4] = r * i + this.m[8] * e), - (this.m[8] = r * -e + this.m[8] * i), - (r = this.m[5]), - (this.m[5] = r * i + this.m[9] * e), - (this.m[9] = r * -e + this.m[9] * i), - (r = this.m[6]), - (this.m[6] = r * i + this.m[10] * e), - (this.m[10] = r * -e + this.m[10] * i), - (r = this.m[7]), - (this.m[7] = r * i + this.m[11] * e), - (this.m[11] = r * -e + this.m[11] * i); - }), - (R.prototype.rotateY = function (t) { - var i = Lt.fcos(t), - e = Lt._$9(t), - r = this.m[0]; - (this.m[0] = r * i + this.m[8] * -e), - (this.m[8] = r * e + this.m[8] * i), - (r = this.m[1]), - (this.m[1] = r * i + this.m[9] * -e), - (this.m[9] = r * e + this.m[9] * i), - (r = m[2]), - (this.m[2] = r * i + this.m[10] * -e), - (this.m[10] = r * e + this.m[10] * i), - (r = m[3]), - (this.m[3] = r * i + this.m[11] * -e), - (this.m[11] = r * e + this.m[11] * i); - }), - (R.prototype.rotateZ = function (t) { - var i = Lt.fcos(t), - e = Lt._$9(t), - r = this.m[0]; - (this.m[0] = r * i + this.m[4] * e), - (this.m[4] = r * -e + this.m[4] * i), - (r = this.m[1]), - (this.m[1] = r * i + this.m[5] * e), - (this.m[5] = r * -e + this.m[5] * i), - (r = this.m[2]), - (this.m[2] = r * i + this.m[6] * e), - (this.m[6] = r * -e + this.m[6] * i), - (r = this.m[3]), - (this.m[3] = r * i + this.m[7] * e), - (this.m[7] = r * -e + this.m[7] * i); - }), - (b.prototype = new et()), - (b._$tP = new Object()), - (b._$27 = function () { - b._$tP.clear(); - }), - (b.getID = function (t) { - var i = b._$tP[t]; - return null == i && ((i = new b(t)), (b._$tP[t] = i)), i; - }), - (b.prototype._$3s = function () { - return new b(); - }), - (F._$kS = -1), - (F._$pS = 0), - (F._$hb = 1), - (F.STATE_IDENTITY = 0), - (F._$gb = 1), - (F._$fo = 2), - (F._$go = 4), - (F.prototype.transform = function (t, i, e) { - var r, - o, - n, - s, - _, - a, - h = 0, - l = 0; - switch (this._$hi) { - default: - return; - case F._$go | F._$fo | F._$gb: - for ( - r = this._$7, - o = this._$H, - n = this._$k, - s = this._$f, - _ = this._$g, - a = this._$w; - --e >= 0; - - ) { - var $ = t[h++], - u = t[h++]; - (i[l++] = r * $ + o * u + n), (i[l++] = s * $ + _ * u + a); - } - return; - case F._$go | F._$fo: - for ( - r = this._$7, o = this._$H, s = this._$f, _ = this._$g; - --e >= 0; - - ) { - var $ = t[h++], - u = t[h++]; - (i[l++] = r * $ + o * u), (i[l++] = s * $ + _ * u); - } - return; - case F._$go | F._$gb: - for ( - o = this._$H, n = this._$k, s = this._$f, a = this._$w; - --e >= 0; - - ) { - var $ = t[h++]; - (i[l++] = o * t[h++] + n), (i[l++] = s * $ + a); - } - return; - case F._$go: - for (o = this._$H, s = this._$f; --e >= 0; ) { - var $ = t[h++]; - (i[l++] = o * t[h++]), (i[l++] = s * $); - } - return; - case F._$fo | F._$gb: - for ( - r = this._$7, n = this._$k, _ = this._$g, a = this._$w; - --e >= 0; - - ) - (i[l++] = r * t[h++] + n), (i[l++] = _ * t[h++] + a); - return; - case F._$fo: - for (r = this._$7, _ = this._$g; --e >= 0; ) - (i[l++] = r * t[h++]), (i[l++] = _ * t[h++]); - return; - case F._$gb: - for (n = this._$k, a = this._$w; --e >= 0; ) - (i[l++] = t[h++] + n), (i[l++] = t[h++] + a); - return; - case F.STATE_IDENTITY: - return void ((t == i && h == l) || w._$jT(t, h, i, l, 2 * e)); - } - }), - (F.prototype.update = function () { - 0 == this._$H && 0 == this._$f - ? 1 == this._$7 && 1 == this._$g - ? 0 == this._$k && 0 == this._$w - ? ((this._$hi = F.STATE_IDENTITY), (this._$Z = F._$pS)) - : ((this._$hi = F._$gb), (this._$Z = F._$hb)) - : 0 == this._$k && 0 == this._$w - ? ((this._$hi = F._$fo), (this._$Z = F._$kS)) - : ((this._$hi = F._$fo | F._$gb), (this._$Z = F._$kS)) - : 0 == this._$7 && 0 == this._$g - ? 0 == this._$k && 0 == this._$w - ? ((this._$hi = F._$go), (this._$Z = F._$kS)) - : ((this._$hi = F._$go | F._$gb), (this._$Z = F._$kS)) - : 0 == this._$k && 0 == this._$w - ? ((this._$hi = F._$go | F._$fo), (this._$Z = F._$kS)) - : ((this._$hi = F._$go | F._$fo | F._$gb), (this._$Z = F._$kS)); - }), - (F.prototype._$RT = function (t) { - this._$IT(t); - var i = t[0], - e = t[2], - r = t[1], - o = t[3], - n = Math.sqrt(i * i + r * r), - s = i * o - e * r; - 0 == n - ? at._$so && console.log("affine._$RT() / rt==0") - : ((t[0] = n), - (t[1] = s / n), - (t[2] = (r * o + i * e) / s), - (t[3] = Math.atan2(r, i))); - }), - (F.prototype._$ho = function (t, i, e, r) { - var o = new Float32Array(6), - n = new Float32Array(6); - t._$RT(o), i._$RT(n); - var s = new Float32Array(6); - (s[0] = o[0] + (n[0] - o[0]) * e), - (s[1] = o[1] + (n[1] - o[1]) * e), - (s[2] = o[2] + (n[2] - o[2]) * e), - (s[3] = o[3] + (n[3] - o[3]) * e), - (s[4] = o[4] + (n[4] - o[4]) * e), - (s[5] = o[5] + (n[5] - o[5]) * e), - r._$CT(s); - }), - (F.prototype._$CT = function (t) { - var i = Math.cos(t[3]), - e = Math.sin(t[3]); - (this._$7 = t[0] * i), - (this._$f = t[0] * e), - (this._$H = t[1] * (t[2] * i - e)), - (this._$g = t[1] * (t[2] * e + i)), - (this._$k = t[4]), - (this._$w = t[5]), - this.update(); - }), - (F.prototype._$IT = function (t) { - (t[0] = this._$7), - (t[1] = this._$f), - (t[2] = this._$H), - (t[3] = this._$g), - (t[4] = this._$k), - (t[5] = this._$w); - }), - (C.prototype = new s()), - (C._$cs = "VISIBLE:"), - (C._$ar = "LAYOUT:"), - (C._$Co = 0), - (C._$D2 = []), - (C._$1T = 1), - (C.loadMotion = function (t) { - var i = new C(), - e = [0], - r = t.length; - i._$yT = 0; - for (var o = 0; o < r; ++o) { - var n = 255 & t[o]; - if ("\n" != n && "\r" != n) - if ("#" != n) - if ("$" != n) { - if ( - ("a" <= n && n <= "z") || - ("A" <= n && n <= "Z") || - "_" == n - ) { - for ( - var s = o, _ = -1; - o < r && "\r" != (n = 255 & t[o]) && "\n" != n; - ++o - ) - if ("=" == n) { - _ = o; - break; - } - if (_ >= 0) { - var a = new B(); - O.startsWith(t, s, C._$cs) - ? ((a._$RP = B._$hs), - (a._$4P = new String(t, s, _ - s))) - : O.startsWith(t, s, C._$ar) - ? ((a._$4P = new String(t, s + 7, _ - s - 7)), - O.startsWith(t, s + 7, "ANCHOR_X") - ? (a._$RP = B._$xs) - : O.startsWith(t, s + 7, "ANCHOR_Y") - ? (a._$RP = B._$us) - : O.startsWith(t, s + 7, "SCALE_X") - ? (a._$RP = B._$qs) - : O.startsWith(t, s + 7, "SCALE_Y") - ? (a._$RP = B._$Ys) - : O.startsWith(t, s + 7, "X") - ? (a._$RP = B._$ws) - : O.startsWith(t, s + 7, "Y") && - (a._$RP = B._$Ns)) - : ((a._$RP = B._$Fr), - (a._$4P = new String(t, s, _ - s))), - i.motions.push(a); - var h = 0; - for ( - C._$D2.clear(), o = _ + 1; - o < r && "\r" != (n = 255 & t[o]) && "\n" != n; - ++o - ) - if ("," != n && " " != n && "\t" != n) { - var l = O._$LS(t, r, o, e); - if (e[0] > 0) { - C._$D2.push(l), h++; - var $ = e[0]; - if ($ < o) { - console.log( - "_$n0 _$hi . @Live2DMotion loadMotion()\n" - ); - break; - } - o = $; - } - } - (a._$I0 = C._$D2._$BL()), h > i._$yT && (i._$yT = h); - } - } - } else { - for ( - var s = o, _ = -1; - o < r && "\r" != (n = 255 & t[o]) && "\n" != n; - ++o - ) - if ("=" == n) { - _ = o; - break; - } - var u = !1; - if (_ >= 0) - for ( - _ == s + 4 && - "f" == t[s + 1] && - "p" == t[s + 2] && - "s" == t[s + 3] && - (u = !0), - o = _ + 1; - o < r && "\r" != (n = 255 & t[o]) && "\n" != n; - ++o - ) - if ("," != n && " " != n && "\t" != n) { - var l = O._$LS(t, r, o, e); - e[0] > 0 && u && 5 < l && l < 121 && (i._$D0 = l), - (o = e[0]); - } - for (; o < r && "\n" != t[o] && "\r" != t[o]; ++o); - } - else for (; o < r && "\n" != t[o] && "\r" != t[o]; ++o); - } - return (i._$AS = ((1e3 * i._$yT) / i._$D0) | 0), i; - }), - (C.prototype.getDurationMSec = function () { - return this._$AS; - }), - (C.prototype.dump = function () { - for (var t = 0; t < this.motions.length; t++) { - var i = this.motions[t]; - console.log("_$wL[%s] [%d]. ", i._$4P, i._$I0.length); - for (var e = 0; e < i._$I0.length && e < 10; e++) - console.log("%5.2f ,", i._$I0[e]); - console.log("\n"); - } - }), - (C.prototype.updateParamExe = function (t, i, e, r) { - for ( - var o = i - r._$z2, - n = (o * this._$D0) / 1e3, - s = 0 | n, - _ = n - s, - a = 0; - a < this.motions.length; - a++ - ) { - var h = this.motions[a], - l = h._$I0.length, - $ = h._$4P; - if (h._$RP == B._$hs) { - var u = h._$I0[s >= l ? l - 1 : s]; - t.setParamFloat($, u); - } else if (B._$ws <= h._$RP && h._$RP <= B._$Ys); - else { - var p = t.getParamFloat($), - f = h._$I0[s >= l ? l - 1 : s], - c = h._$I0[s + 1 >= l ? l - 1 : s + 1], - d = f + (c - f) * _, - g = p + (d - p) * e; - t.setParamFloat($, g); - } - } - s >= this._$yT && - (this._$E - ? ((r._$z2 = i), this.loopFadeIn && (r._$bs = i)) - : (r._$9L = !0)); - }), - (C.prototype._$r0 = function () { - return this._$E; - }), - (C.prototype._$aL = function (t) { - this._$E = t; - }), - (C.prototype.isLoopFadeIn = function () { - return this.loopFadeIn; - }), - (C.prototype.setLoopFadeIn = function (t) { - this.loopFadeIn = t; - }), - (N.prototype.clear = function () { - this.size = 0; - }), - (N.prototype.add = function (t) { - if (this._$P.length <= this.size) { - var i = new Float32Array(2 * this.size); - w._$jT(this._$P, 0, i, 0, this.size), (this._$P = i); - } - this._$P[this.size++] = t; - }), - (N.prototype._$BL = function () { - var t = new Float32Array(this.size); - return w._$jT(this._$P, 0, t, 0, this.size), t; - }), - (B._$Fr = 0), - (B._$hs = 1), - (B._$ws = 100), - (B._$Ns = 101), - (B._$xs = 102), - (B._$us = 103), - (B._$qs = 104), - (B._$Ys = 105), - (U._$Ms = 1), - (U._$Qs = 2), - (U._$i2 = 0), - (U._$No = 2), - (U._$do = U._$Ms), - (U._$Ls = !0), - (U._$1r = 5), - (U._$Qb = 65), - (U._$J = 1e-4), - (U._$FT = 0.001), - (U._$Ss = 3), - (G._$o7 = 6), - (G._$S7 = 7), - (G._$s7 = 8), - (G._$77 = 9), - (G.LIVE2D_FORMAT_VERSION_V2_10_SDK2 = 10), - (G.LIVE2D_FORMAT_VERSION_V2_11_SDK2_1 = 11), - (G._$T7 = G.LIVE2D_FORMAT_VERSION_V2_11_SDK2_1), - (G._$Is = -2004318072), - (G._$h0 = 0), - (G._$4L = 23), - (G._$7P = 33), - (G._$uT = function (t) { - console.log("_$bo :: _$6 _$mo _$E0 : %d\n", t); - }), - (G._$9o = function (t) { - if (t < 40) return G._$uT(t), null; - if (t < 50) return G._$uT(t), null; - if (t < 60) return G._$uT(t), null; - if (t < 100) - switch (t) { - case 65: - return new Z(); - case 66: - return new D(); - case 67: - return new x(); - case 68: - return new z(); - case 69: - return new P(); - case 70: - return new $t(); - default: - return G._$uT(t), null; - } - else if (t < 150) - switch (t) { - case 131: - return new st(); - case 133: - return new tt(); - case 136: - return new p(); - case 137: - return new ot(); - case 142: - return new j(); - } - return G._$uT(t), null; - }), - (Y._$HP = 0), - (Y._$_0 = !0); - (Y._$V2 = -1), - (Y._$W0 = -1), - (Y._$jr = !1), - (Y._$ZS = !0), - (Y._$tr = -1e6), - (Y._$lr = 1e6), - (Y._$is = 32), - (Y._$e = !1), - (Y.prototype.getDrawDataIndex = function (t) { - for (var i = this._$aS.length - 1; i >= 0; --i) - if (null != this._$aS[i] && this._$aS[i].getDrawDataID() == t) - return i; - return -1; - }), - (Y.prototype.getDrawData = function (t) { - if (t instanceof b) { - if (null == this._$Bo) { - this._$Bo = new Object(); - for (var i = this._$aS.length, e = 0; e < i; e++) { - var r = this._$aS[e], - o = r.getDrawDataID(); - null != o && (this._$Bo[o] = r); - } - } - return this._$Bo[id]; - } - return t < this._$aS.length ? this._$aS[t] : null; - }), - (Y.prototype.release = function () { - this._$3S.clear(), - this._$aS.clear(), - this._$F2.clear(), - null != this._$Bo && this._$Bo.clear(), - this._$db.clear(), - this._$8b.clear(), - this._$Hr.clear(); - }), - (Y.prototype.init = function () { - this._$co++, this._$F2.length > 0 && this.release(); - for ( - var t = this._$Ri.getModelImpl(), - i = t._$Xr(), - r = i.length, - o = new Array(), - n = new Array(), - s = 0; - s < r; - ++s - ) { - var _ = i[s]; - this._$F2.push(_), this._$Hr.push(_.init(this)); - for (var a = _.getBaseData(), h = a.length, l = 0; l < h; ++l) - o.push(a[l]); - for (var l = 0; l < h; ++l) { - var $ = a[l].init(this); - $._$l2(s), n.push($); - } - for (var u = _.getDrawData(), p = u.length, l = 0; l < p; ++l) { - var f = u[l], - c = f.init(this); - (c._$IP = s), this._$aS.push(f), this._$8b.push(c); - } - } - for (var d = o.length, g = yt._$2o(); ; ) { - for (var y = !1, s = 0; s < d; ++s) { - var m = o[s]; - if (null != m) { - var T = m.getTargetBaseDataID(); - (null == T || T == g || this.getBaseDataIndex(T) >= 0) && - (this._$3S.push(m), - this._$db.push(n[s]), - (o[s] = null), - (y = !0)); - } - } - if (!y) break; - } - var P = t._$E2(); - if (null != P) { - var S = P._$1s(); - if (null != S) - for (var v = S.length, s = 0; s < v; ++s) { - var L = S[s]; - null != L && - this._$02( - L.getParamID(), - L.getDefaultValue(), - L.getMinValue(), - L.getMaxValue() - ); - } - } - (this.clipManager = new e(this.dp_webgl)), - this.clipManager.init(this, this._$aS, this._$8b), - (this._$QT = !0); - }), - (Y.prototype.update = function () { - Y._$e && _.start("_$zL"); - for (var t = this._$_2.length, i = 0; i < t; i++) - this._$_2[i] != this._$vr[i] && - ((this._$Js[i] = Y._$ZS), (this._$vr[i] = this._$_2[i])); - var e = this._$3S.length, - r = this._$aS.length, - o = W._$or(), - n = W._$Pr(), - s = n - o + 1; - (null == this._$Ws || this._$Ws.length < s) && - ((this._$Ws = new Int16Array(s)), - (this._$Vs = new Int16Array(s))); - for (var i = 0; i < s; i++) - (this._$Ws[i] = Y._$V2), (this._$Vs[i] = Y._$V2); - (null == this._$Er || this._$Er.length < r) && - (this._$Er = new Int16Array(r)); - for (var i = 0; i < r; i++) this._$Er[i] = Y._$W0; - Y._$e && _.dump("_$zL"), Y._$e && _.start("_$UL"); - for (var a = null, h = 0; h < e; ++h) { - var l = this._$3S[h], - $ = this._$db[h]; - try { - l._$Nr(this, $), l._$2b(this, $); - } catch (t) { - null == a && (a = t); - } - } - null != a && Y._$_0 && _._$Rb(a), - Y._$e && _.dump("_$UL"), - Y._$e && _.start("_$DL"); - for (var u = null, p = 0; p < r; ++p) { - var f = this._$aS[p], - c = this._$8b[p]; - try { - if ((f._$Nr(this, c), c._$u2())) continue; - f._$2b(this, c); - var d, - g = Math.floor(f._$zS(this, c) - o); - try { - d = this._$Vs[g]; - } catch (t) { - console.log( - "_$li :: %s / %s \t\t\t\t@@_$fS\n", - t.toString(), - f.getDrawDataID().toString() - ), - (g = Math.floor(f._$zS(this, c) - o)); - continue; - } - d == Y._$V2 ? (this._$Ws[g] = p) : (this._$Er[d] = p), - (this._$Vs[g] = p); - } catch (t) { - null == u && ((u = t), at._$sT(at._$H7)); - } - } - null != u && Y._$_0 && _._$Rb(u), - Y._$e && _.dump("_$DL"), - Y._$e && _.start("_$eL"); - for (var i = this._$Js.length - 1; i >= 0; i--) - this._$Js[i] = Y._$jr; - return (this._$QT = !1), Y._$e && _.dump("_$eL"), !1; - }), - (Y.prototype.preDraw = function (t) { - null != this.clipManager && - (t._$ZT(), this.clipManager.setupClip(this, t)); - }), - (Y.prototype.draw = function (t) { - if (null == this._$Ws) - return void _._$li("call _$Ri.update() before _$Ri.draw() "); - var i = this._$Ws.length; - t._$ZT(); - for (var e = 0; e < i; ++e) { - var r = this._$Ws[e]; - if (r != Y._$V2) - for (;;) { - var o = this._$aS[r], - n = this._$8b[r]; - if (n._$yo()) { - var s = n._$IP, - a = this._$Hr[s]; - (n._$VS = a.getPartsOpacity()), o.draw(t, this, n); - } - var h = this._$Er[r]; - if (h <= r || h == Y._$W0) break; - r = h; - } - } - }), - (Y.prototype.getParamIndex = function (t) { - for (var i = this._$pb.length - 1; i >= 0; --i) - if (this._$pb[i] == t) return i; - return this._$02(t, 0, Y._$tr, Y._$lr); - }), - (Y.prototype._$BS = function (t) { - return this.getBaseDataIndex(t); - }), - (Y.prototype.getBaseDataIndex = function (t) { - for (var i = this._$3S.length - 1; i >= 0; --i) - if (null != this._$3S[i] && this._$3S[i].getBaseDataID() == t) - return i; - return -1; - }), - (Y.prototype._$UT = function (t, i) { - var e = new Float32Array(i); - return w._$jT(t, 0, e, 0, t.length), e; - }), - (Y.prototype._$02 = function (t, i, e, r) { - if (this._$qo >= this._$pb.length) { - var o = this._$pb.length, - n = new Array(2 * o); - w._$jT(this._$pb, 0, n, 0, o), - (this._$pb = n), - (this._$_2 = this._$UT(this._$_2, 2 * o)), - (this._$vr = this._$UT(this._$vr, 2 * o)), - (this._$Rr = this._$UT(this._$Rr, 2 * o)), - (this._$Or = this._$UT(this._$Or, 2 * o)); - var s = new Array(); - w._$jT(this._$Js, 0, s, 0, o), (this._$Js = s); - } - return ( - (this._$pb[this._$qo] = t), - (this._$_2[this._$qo] = i), - (this._$vr[this._$qo] = i), - (this._$Rr[this._$qo] = e), - (this._$Or[this._$qo] = r), - (this._$Js[this._$qo] = Y._$ZS), - this._$qo++ - ); - }), - (Y.prototype._$Zo = function (t, i) { - this._$3S[t] = i; - }), - (Y.prototype.setParamFloat = function (t, i) { - i < this._$Rr[t] && (i = this._$Rr[t]), - i > this._$Or[t] && (i = this._$Or[t]), - (this._$_2[t] = i); - }), - (Y.prototype.loadParam = function () { - var t = this._$_2.length; - t > this._$fs.length && (t = this._$fs.length), - w._$jT(this._$fs, 0, this._$_2, 0, t); - }), - (Y.prototype.saveParam = function () { - var t = this._$_2.length; - t > this._$fs.length && (this._$fs = new Float32Array(t)), - w._$jT(this._$_2, 0, this._$fs, 0, t); - }), - (Y.prototype._$v2 = function () { - return this._$co; - }), - (Y.prototype._$WS = function () { - return this._$QT; - }), - (Y.prototype._$Xb = function (t) { - return this._$Js[t] == Y._$ZS; - }), - (Y.prototype._$vs = function () { - return this._$Es; - }), - (Y.prototype._$Tr = function () { - return this._$ZP; - }), - (Y.prototype.getBaseData = function (t) { - return this._$3S[t]; - }), - (Y.prototype.getParamFloat = function (t) { - return this._$_2[t]; - }), - (Y.prototype.getParamMax = function (t) { - return this._$Or[t]; - }), - (Y.prototype.getParamMin = function (t) { - return this._$Rr[t]; - }), - (Y.prototype.setPartsOpacity = function (t, i) { - this._$Hr[t].setPartsOpacity(i); - }), - (Y.prototype.getPartsOpacity = function (t) { - return this._$Hr[t].getPartsOpacity(); - }), - (Y.prototype.getPartsDataIndex = function (t) { - for (var i = this._$F2.length - 1; i >= 0; --i) - if (null != this._$F2[i] && this._$F2[i]._$p2() == t) return i; - return -1; - }), - (Y.prototype._$q2 = function (t) { - return this._$db[t]; - }), - (Y.prototype._$C2 = function (t) { - return this._$8b[t]; - }), - (Y.prototype._$Bb = function (t) { - return this._$Hr[t]; - }), - (Y.prototype._$5s = function (t, i) { - for (var e = this._$Ws.length, r = t, o = 0; o < e; ++o) { - var n = this._$Ws[o]; - if (n != Y._$V2) - for (;;) { - var s = this._$8b[n]; - s._$yo() && (s._$GT()._$B2(this, s, r), (r += i)); - var _ = this._$Er[n]; - if (_ <= n || _ == Y._$W0) break; - n = _; - } - } - }), - (Y.prototype.setDrawParam = function (t) { - this.dp_webgl = t; - }), - (Y.prototype.getDrawParam = function () { - return this.dp_webgl; - }), - (k._$0T = function (t) { - return k._$0T(new _$5(t)); - }), - (k._$0T = function (t) { - if (!t.exists()) throw new _$ls(t._$3b()); - for ( - var i, - e = t.length(), - r = new Int8Array(e), - o = new _$Xs(new _$kb(t), 8192), - n = 0; - (i = o.read(r, n, e - n)) > 0; - - ) - n += i; - return r; - }), - (k._$C = function (t) { - var i = null, - e = null; - try { - (i = t instanceof Array ? t : new _$Xs(t, 8192)), - (e = new _$js()); - for (var r, o = new Int8Array(1e3); (r = i.read(o)) > 0; ) - e.write(o, 0, r); - return e._$TS(); - } finally { - null != t && t.close(), null != e && (e.flush(), e.close()); - } - }), - (V.prototype._$T2 = function () { - return w.getUserTimeMSec() + Math._$10() * (2 * this._$Br - 1); - }), - (V.prototype._$uo = function (t) { - this._$Br = t; - }), - (V.prototype._$QS = function (t, i, e) { - (this._$Dr = t), (this._$Cb = i), (this._$mr = e); - }), - (V.prototype._$7T = function (t) { - var i, - e = w.getUserTimeMSec(), - r = 0; - switch (this._$_L) { - case STATE_CLOSING: - (r = (e - this._$bb) / this._$Dr), - r >= 1 && - ((r = 1), (this._$_L = wt.STATE_CLOSED), (this._$bb = e)), - (i = 1 - r); - break; - case STATE_CLOSED: - (r = (e - this._$bb) / this._$Cb), - r >= 1 && ((this._$_L = wt.STATE_OPENING), (this._$bb = e)), - (i = 0); - break; - case STATE_OPENING: - (r = (e - this._$bb) / this._$mr), - r >= 1 && - ((r = 1), - (this._$_L = wt.STATE_INTERVAL), - (this._$12 = this._$T2())), - (i = r); - break; - case STATE_INTERVAL: - this._$12 < e && - ((this._$_L = wt.STATE_CLOSING), (this._$bb = e)), - (i = 1); - break; - case STATE_FIRST: - default: - (this._$_L = wt.STATE_INTERVAL), - (this._$12 = this._$T2()), - (i = 1); - } - this._$jo || (i = -i), - t.setParamFloat(this._$iL, i), - t.setParamFloat(this._$0L, i); - }); - var wt = function () {}; - (wt.STATE_FIRST = "STATE_FIRST"), - (wt.STATE_INTERVAL = "STATE_INTERVAL"), - (wt.STATE_CLOSING = "STATE_CLOSING"), - (wt.STATE_CLOSED = "STATE_CLOSED"), - (wt.STATE_OPENING = "STATE_OPENING"), - (X.prototype = new E()), - (X._$As = 32), - (X._$Gr = !1), - (X._$NT = null), - (X._$vS = null), - (X._$no = null), - (X._$9r = function (t) { - return new Float32Array(t); - }), - (X._$vb = function (t) { - return new Int16Array(t); - }), - (X._$cr = function (t, i) { - return ( - null == t || t._$yL() < i.length - ? ((t = X._$9r(2 * i.length)), t.put(i), t._$oT(0)) - : (t.clear(), t.put(i), t._$oT(0)), - t - ); - }), - (X._$mb = function (t, i) { - return ( - null == t || t._$yL() < i.length - ? ((t = X._$vb(2 * i.length)), t.put(i), t._$oT(0)) - : (t.clear(), t.put(i), t._$oT(0)), - t - ); - }), - (X._$Hs = function () { - return X._$Gr; - }), - (X._$as = function (t) { - X._$Gr = t; - }), - (X.prototype.setGL = function (t) { - this.gl = t; - }), - (X.prototype.setTransform = function (t) { - this.transform = t; - }), - (X.prototype._$ZT = function () {}), - (X.prototype._$Uo = function (t, i, e, r, o, n, s, _) { - if (!(n < 0.01)) { - var a = this._$U2[t], - h = n > 0.9 ? at.EXPAND_W : 0; - this.gl.drawElements(a, e, r, o, n, h, this.transform, _); - } - }), - (X.prototype._$Rs = function () { - throw new Error("_$Rs"); - }), - (X.prototype._$Ds = function (t) { - throw new Error("_$Ds"); - }), - (X.prototype._$K2 = function () { - for (var t = 0; t < this._$sb.length; t++) { - 0 != this._$sb[t] && - (this.gl._$Sr(1, this._$sb, t), (this._$sb[t] = 0)); - } - }), - (X.prototype.setTexture = function (t, i) { - this._$sb.length < t + 1 && this._$nS(t), (this._$sb[t] = i); - }), - (X.prototype.setTexture = function (t, i) { - this._$sb.length < t + 1 && this._$nS(t), (this._$U2[t] = i); - }), - (X.prototype._$nS = function (t) { - var i = Math.max(2 * this._$sb.length, t + 1 + 10), - e = new Int32Array(i); - w._$jT(this._$sb, 0, e, 0, this._$sb.length), (this._$sb = e); - var r = new Array(); - w._$jT(this._$U2, 0, r, 0, this._$U2.length), (this._$U2 = r); - }), - (z.prototype = new I()), - (z._$Xo = new Float32Array(2)), - (z._$io = new Float32Array(2)), - (z._$0o = new Float32Array(2)), - (z._$Lo = new Float32Array(2)), - (z._$To = new Float32Array(2)), - (z._$Po = new Float32Array(2)), - (z._$gT = new Array()), - (z.prototype._$zP = function () { - (this._$GS = new D()), this._$GS._$zP(), (this._$Y0 = new Array()); - }), - (z.prototype.getType = function () { - return I._$c2; - }), - (z.prototype._$F0 = function (t) { - I.prototype._$F0.call(this, t), - (this._$GS = t._$nP()), - (this._$Y0 = t._$nP()), - I.prototype.readV2_opacity.call(this, t); - }), - (z.prototype.init = function (t) { - var i = new H(this); - return (i._$Yr = new P()), this._$32() && (i._$Wr = new P()), i; - }), - (z.prototype._$Nr = function (t, i) { - this != i._$GT() && console.log("### assert!! ### "); - var e = i; - if (this._$GS._$Ur(t)) { - var r = z._$gT; - r[0] = !1; - var o = this._$GS._$Q2(t, r); - i._$Ib(r[0]), this.interpolateOpacity(t, this._$GS, i, r); - var n = t._$vs(), - s = t._$Tr(); - if ((this._$GS._$zr(n, s, o), o <= 0)) { - var _ = this._$Y0[n[0]]; - e._$Yr.init(_); - } else if (1 == o) { - var _ = this._$Y0[n[0]], - a = this._$Y0[n[1]], - h = s[0]; - (e._$Yr._$fL = _._$fL + (a._$fL - _._$fL) * h), - (e._$Yr._$gL = _._$gL + (a._$gL - _._$gL) * h), - (e._$Yr._$B0 = _._$B0 + (a._$B0 - _._$B0) * h), - (e._$Yr._$z0 = _._$z0 + (a._$z0 - _._$z0) * h), - (e._$Yr._$qT = _._$qT + (a._$qT - _._$qT) * h); - } else if (2 == o) { - var _ = this._$Y0[n[0]], - a = this._$Y0[n[1]], - l = this._$Y0[n[2]], - $ = this._$Y0[n[3]], - h = s[0], - u = s[1], - p = _._$fL + (a._$fL - _._$fL) * h, - f = l._$fL + ($._$fL - l._$fL) * h; - (e._$Yr._$fL = p + (f - p) * u), - (p = _._$gL + (a._$gL - _._$gL) * h), - (f = l._$gL + ($._$gL - l._$gL) * h), - (e._$Yr._$gL = p + (f - p) * u), - (p = _._$B0 + (a._$B0 - _._$B0) * h), - (f = l._$B0 + ($._$B0 - l._$B0) * h), - (e._$Yr._$B0 = p + (f - p) * u), - (p = _._$z0 + (a._$z0 - _._$z0) * h), - (f = l._$z0 + ($._$z0 - l._$z0) * h), - (e._$Yr._$z0 = p + (f - p) * u), - (p = _._$qT + (a._$qT - _._$qT) * h), - (f = l._$qT + ($._$qT - l._$qT) * h), - (e._$Yr._$qT = p + (f - p) * u); - } else if (3 == o) { - var c = this._$Y0[n[0]], - d = this._$Y0[n[1]], - g = this._$Y0[n[2]], - y = this._$Y0[n[3]], - m = this._$Y0[n[4]], - T = this._$Y0[n[5]], - P = this._$Y0[n[6]], - S = this._$Y0[n[7]], - h = s[0], - u = s[1], - v = s[2], - p = c._$fL + (d._$fL - c._$fL) * h, - f = g._$fL + (y._$fL - g._$fL) * h, - L = m._$fL + (T._$fL - m._$fL) * h, - M = P._$fL + (S._$fL - P._$fL) * h; - (e._$Yr._$fL = - (1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)), - (p = c._$gL + (d._$gL - c._$gL) * h), - (f = g._$gL + (y._$gL - g._$gL) * h), - (L = m._$gL + (T._$gL - m._$gL) * h), - (M = P._$gL + (S._$gL - P._$gL) * h), - (e._$Yr._$gL = - (1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)), - (p = c._$B0 + (d._$B0 - c._$B0) * h), - (f = g._$B0 + (y._$B0 - g._$B0) * h), - (L = m._$B0 + (T._$B0 - m._$B0) * h), - (M = P._$B0 + (S._$B0 - P._$B0) * h), - (e._$Yr._$B0 = - (1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)), - (p = c._$z0 + (d._$z0 - c._$z0) * h), - (f = g._$z0 + (y._$z0 - g._$z0) * h), - (L = m._$z0 + (T._$z0 - m._$z0) * h), - (M = P._$z0 + (S._$z0 - P._$z0) * h), - (e._$Yr._$z0 = - (1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)), - (p = c._$qT + (d._$qT - c._$qT) * h), - (f = g._$qT + (y._$qT - g._$qT) * h), - (L = m._$qT + (T._$qT - m._$qT) * h), - (M = P._$qT + (S._$qT - P._$qT) * h), - (e._$Yr._$qT = - (1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)); - } else if (4 == o) { - var E = this._$Y0[n[0]], - A = this._$Y0[n[1]], - I = this._$Y0[n[2]], - w = this._$Y0[n[3]], - x = this._$Y0[n[4]], - O = this._$Y0[n[5]], - D = this._$Y0[n[6]], - R = this._$Y0[n[7]], - b = this._$Y0[n[8]], - F = this._$Y0[n[9]], - C = this._$Y0[n[10]], - N = this._$Y0[n[11]], - B = this._$Y0[n[12]], - U = this._$Y0[n[13]], - G = this._$Y0[n[14]], - Y = this._$Y0[n[15]], - h = s[0], - u = s[1], - v = s[2], - k = s[3], - p = E._$fL + (A._$fL - E._$fL) * h, - f = I._$fL + (w._$fL - I._$fL) * h, - L = x._$fL + (O._$fL - x._$fL) * h, - M = D._$fL + (R._$fL - D._$fL) * h, - V = b._$fL + (F._$fL - b._$fL) * h, - X = C._$fL + (N._$fL - C._$fL) * h, - H = B._$fL + (U._$fL - B._$fL) * h, - W = G._$fL + (Y._$fL - G._$fL) * h; - (e._$Yr._$fL = - (1 - k) * - ((1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)) + - k * ((1 - v) * (V + (X - V) * u) + v * (H + (W - H) * u))), - (p = E._$gL + (A._$gL - E._$gL) * h), - (f = I._$gL + (w._$gL - I._$gL) * h), - (L = x._$gL + (O._$gL - x._$gL) * h), - (M = D._$gL + (R._$gL - D._$gL) * h), - (V = b._$gL + (F._$gL - b._$gL) * h), - (X = C._$gL + (N._$gL - C._$gL) * h), - (H = B._$gL + (U._$gL - B._$gL) * h), - (W = G._$gL + (Y._$gL - G._$gL) * h), - (e._$Yr._$gL = - (1 - k) * - ((1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)) + - k * ((1 - v) * (V + (X - V) * u) + v * (H + (W - H) * u))), - (p = E._$B0 + (A._$B0 - E._$B0) * h), - (f = I._$B0 + (w._$B0 - I._$B0) * h), - (L = x._$B0 + (O._$B0 - x._$B0) * h), - (M = D._$B0 + (R._$B0 - D._$B0) * h), - (V = b._$B0 + (F._$B0 - b._$B0) * h), - (X = C._$B0 + (N._$B0 - C._$B0) * h), - (H = B._$B0 + (U._$B0 - B._$B0) * h), - (W = G._$B0 + (Y._$B0 - G._$B0) * h), - (e._$Yr._$B0 = - (1 - k) * - ((1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)) + - k * ((1 - v) * (V + (X - V) * u) + v * (H + (W - H) * u))), - (p = E._$z0 + (A._$z0 - E._$z0) * h), - (f = I._$z0 + (w._$z0 - I._$z0) * h), - (L = x._$z0 + (O._$z0 - x._$z0) * h), - (M = D._$z0 + (R._$z0 - D._$z0) * h), - (V = b._$z0 + (F._$z0 - b._$z0) * h), - (X = C._$z0 + (N._$z0 - C._$z0) * h), - (H = B._$z0 + (U._$z0 - B._$z0) * h), - (W = G._$z0 + (Y._$z0 - G._$z0) * h), - (e._$Yr._$z0 = - (1 - k) * - ((1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)) + - k * ((1 - v) * (V + (X - V) * u) + v * (H + (W - H) * u))), - (p = E._$qT + (A._$qT - E._$qT) * h), - (f = I._$qT + (w._$qT - I._$qT) * h), - (L = x._$qT + (O._$qT - x._$qT) * h), - (M = D._$qT + (R._$qT - D._$qT) * h), - (V = b._$qT + (F._$qT - b._$qT) * h), - (X = C._$qT + (N._$qT - C._$qT) * h), - (H = B._$qT + (U._$qT - B._$qT) * h), - (W = G._$qT + (Y._$qT - G._$qT) * h), - (e._$Yr._$qT = - (1 - k) * - ((1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)) + - k * ((1 - v) * (V + (X - V) * u) + v * (H + (W - H) * u))); - } else { - for ( - var j = 0 | Math.pow(2, o), q = new Float32Array(j), J = 0; - J < j; - J++ - ) { - for (var Q = J, Z = 1, K = 0; K < o; K++) - (Z *= Q % 2 == 0 ? 1 - s[K] : s[K]), (Q /= 2); - q[J] = Z; - } - for (var tt = new Array(), it = 0; it < j; it++) - tt[it] = this._$Y0[n[it]]; - for ( - var et = 0, rt = 0, ot = 0, nt = 0, st = 0, it = 0; - it < j; - it++ - ) - (et += q[it] * tt[it]._$fL), - (rt += q[it] * tt[it]._$gL), - (ot += q[it] * tt[it]._$B0), - (nt += q[it] * tt[it]._$z0), - (st += q[it] * tt[it]._$qT); - (e._$Yr._$fL = et), - (e._$Yr._$gL = rt), - (e._$Yr._$B0 = ot), - (e._$Yr._$z0 = nt), - (e._$Yr._$qT = st); - } - var _ = this._$Y0[n[0]]; - (e._$Yr.reflectX = _.reflectX), (e._$Yr.reflectY = _.reflectY); - } - }), - (z.prototype._$2b = function (t, i) { - this != i._$GT() && console.log("### assert!! ### "); - var e = i; - if ((e._$hS(!0), this._$32())) { - var r = this.getTargetBaseDataID(); - if ( - (e._$8r == I._$ur && (e._$8r = t.getBaseDataIndex(r)), - e._$8r < 0) - ) - at._$so && _._$li("_$L _$0P _$G :: %s", r), e._$hS(!1); - else { - var o = t.getBaseData(e._$8r); - if (null != o) { - var n = t._$q2(e._$8r), - s = z._$Xo; - (s[0] = e._$Yr._$fL), (s[1] = e._$Yr._$gL); - var a = z._$io; - (a[0] = 0), (a[1] = -0.1); - n._$GT().getType() == I._$c2 ? (a[1] = -10) : (a[1] = -0.1); - var h = z._$0o; - this._$Jr(t, o, n, s, a, h); - var l = Lt._$92(a, h); - o._$nb(t, n, s, s, 1, 0, 2), - (e._$Wr._$fL = s[0]), - (e._$Wr._$gL = s[1]), - (e._$Wr._$B0 = e._$Yr._$B0), - (e._$Wr._$z0 = e._$Yr._$z0), - (e._$Wr._$qT = e._$Yr._$qT - l * Lt._$NS); - var $ = n.getTotalScale(); - e.setTotalScale_notForClient($ * e._$Wr._$B0); - var u = n.getTotalOpacity(); - e.setTotalOpacity(u * e.getInterpolatedOpacity()), - (e._$Wr.reflectX = e._$Yr.reflectX), - (e._$Wr.reflectY = e._$Yr.reflectY), - e._$hS(n._$yo()); - } else e._$hS(!1); - } - } else - e.setTotalScale_notForClient(e._$Yr._$B0), - e.setTotalOpacity(e.getInterpolatedOpacity()); - }), - (z.prototype._$nb = function (t, i, e, r, o, n, s) { - this != i._$GT() && console.log("### assert!! ### "); - for ( - var _, - a, - h = i, - l = null != h._$Wr ? h._$Wr : h._$Yr, - $ = Math.sin(Lt._$bS * l._$qT), - u = Math.cos(Lt._$bS * l._$qT), - p = h.getTotalScale(), - f = l.reflectX ? -1 : 1, - c = l.reflectY ? -1 : 1, - d = u * p * f, - g = -$ * p * c, - y = $ * p * f, - m = u * p * c, - T = l._$fL, - P = l._$gL, - S = o * s, - v = n; - v < S; - v += s - ) - (_ = e[v]), - (a = e[v + 1]), - (r[v] = d * _ + g * a + T), - (r[v + 1] = y * _ + m * a + P); - }), - (z.prototype._$Jr = function (t, i, e, r, o, n) { - i != e._$GT() && console.log("### assert!! ### "); - var s = z._$Lo; - (z._$Lo[0] = r[0]), (z._$Lo[1] = r[1]), i._$nb(t, e, s, s, 1, 0, 2); - for (var _ = z._$To, a = z._$Po, h = 1, l = 0; l < 10; l++) { - if ( - ((a[0] = r[0] + h * o[0]), - (a[1] = r[1] + h * o[1]), - i._$nb(t, e, a, _, 1, 0, 2), - (_[0] -= s[0]), - (_[1] -= s[1]), - 0 != _[0] || 0 != _[1]) - ) - return (n[0] = _[0]), void (n[1] = _[1]); - if ( - ((a[0] = r[0] - h * o[0]), - (a[1] = r[1] - h * o[1]), - i._$nb(t, e, a, _, 1, 0, 2), - (_[0] -= s[0]), - (_[1] -= s[1]), - 0 != _[0] || 0 != _[1]) - ) - return ( - (_[0] = -_[0]), - (_[0] = -_[0]), - (n[0] = _[0]), - void (n[1] = _[1]) - ); - h *= 0.1; - } - at._$so && console.log("_$L0 to transform _$SP\n"); - }), - (H.prototype = new _t()), - (W.prototype = new M()), - (W._$ur = -2), - (W._$ES = 500), - (W._$wb = 2), - (W._$8S = 3), - (W._$os = 4), - (W._$52 = W._$ES), - (W._$R2 = W._$ES), - (W._$Sb = function (t) { - for (var i = t.length - 1; i >= 0; --i) { - var e = t[i]; - e < W._$52 ? (W._$52 = e) : e > W._$R2 && (W._$R2 = e); - } - }), - (W._$or = function () { - return W._$52; - }), - (W._$Pr = function () { - return W._$R2; - }), - (W.prototype._$F0 = function (t) { - (this._$gP = t._$nP()), - (this._$dr = t._$nP()), - (this._$GS = t._$nP()), - (this._$qb = t._$6L()), - (this._$Lb = t._$cS()), - (this._$mS = t._$Tb()), - t.getFormatVersion() >= G._$T7 - ? ((this.clipID = t._$nP()), - (this.clipIDList = this.convertClipIDForV2_11(this.clipID))) - : (this.clipIDList = null), - W._$Sb(this._$Lb); - }), - (W.prototype.getClipIDList = function () { - return this.clipIDList; - }), - (W.prototype._$Nr = function (t, i) { - if ( - ((i._$IS[0] = !1), - (i._$Us = v._$Z2(t, this._$GS, i._$IS, this._$Lb)), - at._$Zs) - ); - else if (i._$IS[0]) return; - i._$7s = v._$br(t, this._$GS, i._$IS, this._$mS); - }), - (W.prototype._$2b = function (t) {}), - (W.prototype.getDrawDataID = function () { - return this._$gP; - }), - (W.prototype._$j2 = function (t) { - this._$gP = t; - }), - (W.prototype.getOpacity = function (t, i) { - return i._$7s; - }), - (W.prototype._$zS = function (t, i) { - return i._$Us; - }), - (W.prototype.getTargetBaseDataID = function () { - return this._$dr; - }), - (W.prototype._$gs = function (t) { - this._$dr = t; - }), - (W.prototype._$32 = function () { - return null != this._$dr && this._$dr != yt._$2o(); - }), - (W.prototype.getType = function () {}), - (j._$42 = 0), - (j.prototype._$1b = function () { - return this._$3S; - }), - (j.prototype.getDrawDataList = function () { - return this._$aS; - }), - (j.prototype._$F0 = function (t) { - (this._$NL = t._$nP()), - (this._$aS = t._$nP()), - (this._$3S = t._$nP()); - }), - (j.prototype._$kr = function (t) { - t._$Zo(this._$3S), - t._$xo(this._$aS), - (this._$3S = null), - (this._$aS = null); - }), - (q.prototype = new i()), - (q.loadModel = function (t) { - var e = new q(); - return i._$62(e, t), e; - }), - (q.loadModel = function (t) { - var e = new q(); - return i._$62(e, t), e; - }), - (q._$to = function () { - return new q(); - }), - (q._$er = function (t) { - var i = new _$5("../_$_r/_$t0/_$Ri/_$_P._$d"); - if (0 == i.exists()) - throw new _$ls("_$t0 _$_ _$6 _$Ui :: " + i._$PL()); - for ( - var e = [ - "../_$_r/_$t0/_$Ri/_$_P.512/_$CP._$1", - "../_$_r/_$t0/_$Ri/_$_P.512/_$vP._$1", - "../_$_r/_$t0/_$Ri/_$_P.512/_$EP._$1", - "../_$_r/_$t0/_$Ri/_$_P.512/_$pP._$1", - ], - r = q.loadModel(i._$3b()), - o = 0; - o < e.length; - o++ - ) { - var n = new _$5(e[o]); - if (0 == n.exists()) - throw new _$ls("_$t0 _$_ _$6 _$Ui :: " + n._$PL()); - r.setTexture(o, _$nL._$_o(t, n._$3b())); - } - return r; - }), - (q.prototype.setGL = function (t) { - this._$zo.setGL(t); - }), - (q.prototype.setTransform = function (t) { - this._$zo.setTransform(t); - }), - (q.prototype.draw = function () { - this._$5S.draw(this._$zo); - }), - (q.prototype._$K2 = function () { - this._$zo._$K2(); - }), - (q.prototype.setTexture = function (t, i) { - null == this._$zo && - _._$li("_$Yi for QT _$ki / _$XS() is _$6 _$ui!!"), - this._$zo.setTexture(t, i); - }), - (q.prototype.setTexture = function (t, i) { - null == this._$zo && - _._$li("_$Yi for QT _$ki / _$XS() is _$6 _$ui!!"), - this._$zo.setTexture(t, i); - }), - (q.prototype._$Rs = function () { - return this._$zo._$Rs(); - }), - (q.prototype._$Ds = function (t) { - this._$zo._$Ds(t); - }), - (q.prototype.getDrawParam = function () { - return this._$zo; - }), - (J.prototype = new s()), - (J._$cs = "VISIBLE:"), - (J._$ar = "LAYOUT:"), - (J.MTN_PREFIX_FADEIN = "FADEIN:"), - (J.MTN_PREFIX_FADEOUT = "FADEOUT:"), - (J._$Co = 0), - (J._$1T = 1), - (J.loadMotion = function (t) { - var i = k._$C(t); - return J.loadMotion(i); - }), - (J.loadMotion = function (t) { - t instanceof ArrayBuffer && (t = new DataView(t)); - var i = new J(), - e = [0], - r = t.byteLength; - i._$yT = 0; - for (var o = 0; o < r; ++o) { - var n = Q(t, o), - s = n.charCodeAt(0); - if ("\n" != n && "\r" != n) - if ("#" != n) - if ("$" != n) { - if ( - (97 <= s && s <= 122) || - (65 <= s && s <= 90) || - "_" == n - ) { - for ( - var _ = o, a = -1; - o < r && "\r" != (n = Q(t, o)) && "\n" != n; - ++o - ) - if ("=" == n) { - a = o; - break; - } - if (a >= 0) { - var h = new B(); - O.startsWith(t, _, J._$cs) - ? ((h._$RP = B._$hs), - (h._$4P = O.createString(t, _, a - _))) - : O.startsWith(t, _, J._$ar) - ? ((h._$4P = O.createString(t, _ + 7, a - _ - 7)), - O.startsWith(t, _ + 7, "ANCHOR_X") - ? (h._$RP = B._$xs) - : O.startsWith(t, _ + 7, "ANCHOR_Y") - ? (h._$RP = B._$us) - : O.startsWith(t, _ + 7, "SCALE_X") - ? (h._$RP = B._$qs) - : O.startsWith(t, _ + 7, "SCALE_Y") - ? (h._$RP = B._$Ys) - : O.startsWith(t, _ + 7, "X") - ? (h._$RP = B._$ws) - : O.startsWith(t, _ + 7, "Y") && - (h._$RP = B._$Ns)) - : ((h._$RP = B._$Fr), - (h._$4P = O.createString(t, _, a - _))), - i.motions.push(h); - var l = 0, - $ = []; - for ( - o = a + 1; - o < r && "\r" != (n = Q(t, o)) && "\n" != n; - ++o - ) - if ("," != n && " " != n && "\t" != n) { - var u = O._$LS(t, r, o, e); - if (e[0] > 0) { - $.push(u), l++; - var p = e[0]; - if (p < o) { - console.log( - "_$n0 _$hi . @Live2DMotion loadMotion()\n" - ); - break; - } - o = p - 1; - } - } - (h._$I0 = new Float32Array($)), - l > i._$yT && (i._$yT = l); - } - } - } else { - for ( - var _ = o, a = -1; - o < r && "\r" != (n = Q(t, o)) && "\n" != n; - ++o - ) - if ("=" == n) { - a = o; - break; - } - var f = !1; - if (a >= 0) - for ( - a == _ + 4 && - "f" == Q(t, _ + 1) && - "p" == Q(t, _ + 2) && - "s" == Q(t, _ + 3) && - (f = !0), - o = a + 1; - o < r && "\r" != (n = Q(t, o)) && "\n" != n; - ++o - ) - if ("," != n && " " != n && "\t" != n) { - var u = O._$LS(t, r, o, e); - e[0] > 0 && f && 5 < u && u < 121 && (i._$D0 = u), - (o = e[0]); - } - for (; o < r && "\n" != Q(t, o) && "\r" != Q(t, o); ++o); - } - else for (; o < r && "\n" != Q(t, o) && "\r" != Q(t, o); ++o); - } - return (i._$rr = ((1e3 * i._$yT) / i._$D0) | 0), i; - }), - (J.prototype.getDurationMSec = function () { - return this._$E ? -1 : this._$rr; - }), - (J.prototype.getLoopDurationMSec = function () { - return this._$rr; - }), - (J.prototype.dump = function () { - for (var t = 0; t < this.motions.length; t++) { - var i = this.motions[t]; - console.log("_$wL[%s] [%d]. ", i._$4P, i._$I0.length); - for (var e = 0; e < i._$I0.length && e < 10; e++) - console.log("%5.2f ,", i._$I0[e]); - console.log("\n"); - } - }), - (J.prototype.updateParamExe = function (t, i, e, r) { - for ( - var o = i - r._$z2, - n = (o * this._$D0) / 1e3, - s = 0 | n, - _ = n - s, - a = 0; - a < this.motions.length; - a++ - ) { - var h = this.motions[a], - l = h._$I0.length, - $ = h._$4P; - if (h._$RP == B._$hs) { - var u = h._$I0[s >= l ? l - 1 : s]; - t.setParamFloat($, u); - } else if (B._$ws <= h._$RP && h._$RP <= B._$Ys); - else { - var p, - f = t.getParamIndex($), - c = t.getModelContext(), - d = c.getParamMax(f), - g = c.getParamMin(f), - y = 0.4 * (d - g), - m = c.getParamFloat(f), - T = h._$I0[s >= l ? l - 1 : s], - P = h._$I0[s + 1 >= l ? l - 1 : s + 1]; - p = - (T < P && P - T > y) || (T > P && T - P > y) - ? T - : T + (P - T) * _; - var S = m + (p - m) * e; - t.setParamFloat($, S); - } - } - s >= this._$yT && - (this._$E - ? ((r._$z2 = i), this.loopFadeIn && (r._$bs = i)) - : (r._$9L = !0)), - (this._$eP = e); - }), - (J.prototype._$r0 = function () { - return this._$E; - }), - (J.prototype._$aL = function (t) { - this._$E = t; - }), - (J.prototype._$S0 = function () { - return this._$D0; - }), - (J.prototype._$U0 = function (t) { - this._$D0 = t; - }), - (J.prototype.isLoopFadeIn = function () { - return this.loopFadeIn; - }), - (J.prototype.setLoopFadeIn = function (t) { - this.loopFadeIn = t; - }), - (N.prototype.clear = function () { - this.size = 0; - }), - (N.prototype.add = function (t) { - if (this._$P.length <= this.size) { - var i = new Float32Array(2 * this.size); - w._$jT(this._$P, 0, i, 0, this.size), (this._$P = i); - } - this._$P[this.size++] = t; - }), - (N.prototype._$BL = function () { - var t = new Float32Array(this.size); - return w._$jT(this._$P, 0, t, 0, this.size), t; - }), - (B._$Fr = 0), - (B._$hs = 1), - (B._$ws = 100), - (B._$Ns = 101), - (B._$xs = 102), - (B._$us = 103), - (B._$qs = 104), - (B._$Ys = 105), - (Z.prototype = new I()), - (Z._$gT = new Array()), - (Z.prototype._$zP = function () { - (this._$GS = new D()), this._$GS._$zP(); - }), - (Z.prototype._$F0 = function (t) { - I.prototype._$F0.call(this, t), - (this._$A = t._$6L()), - (this._$o = t._$6L()), - (this._$GS = t._$nP()), - (this._$Eo = t._$nP()), - I.prototype.readV2_opacity.call(this, t); - }), - (Z.prototype.init = function (t) { - var i = new K(this), - e = (this._$o + 1) * (this._$A + 1); - return ( - null != i._$Cr && (i._$Cr = null), - (i._$Cr = new Float32Array(2 * e)), - null != i._$hr && (i._$hr = null), - this._$32() - ? (i._$hr = new Float32Array(2 * e)) - : (i._$hr = null), - i - ); - }), - (Z.prototype._$Nr = function (t, i) { - var e = i; - if (this._$GS._$Ur(t)) { - var r = this._$VT(), - o = Z._$gT; - (o[0] = !1), - v._$Vr(t, this._$GS, o, r, this._$Eo, e._$Cr, 0, 2), - i._$Ib(o[0]), - this.interpolateOpacity(t, this._$GS, i, o); - } - }), - (Z.prototype._$2b = function (t, i) { - var e = i; - if ((e._$hS(!0), this._$32())) { - var r = this.getTargetBaseDataID(); - if ( - (e._$8r == I._$ur && (e._$8r = t.getBaseDataIndex(r)), - e._$8r < 0) - ) - at._$so && _._$li("_$L _$0P _$G :: %s", r), e._$hS(!1); - else { - var o = t.getBaseData(e._$8r), - n = t._$q2(e._$8r); - if (null != o && n._$yo()) { - var s = n.getTotalScale(); - e.setTotalScale_notForClient(s); - var a = n.getTotalOpacity(); - e.setTotalOpacity(a * e.getInterpolatedOpacity()), - o._$nb(t, n, e._$Cr, e._$hr, this._$VT(), 0, 2), - e._$hS(!0); - } else e._$hS(!1); - } - } else e.setTotalOpacity(e.getInterpolatedOpacity()); - }), - (Z.prototype._$nb = function (t, i, e, r, o, n, s) { - var _ = i, - a = null != _._$hr ? _._$hr : _._$Cr; - Z.transformPoints_sdk2(e, r, o, n, s, a, this._$o, this._$A); - }), - (Z.transformPoints_sdk2 = function (i, e, r, o, n, s, _, a) { - for ( - var h, - l, - $, - u = r * n, - p = 0, - f = 0, - c = 0, - d = 0, - g = 0, - y = 0, - m = !1, - T = o; - T < u; - T += n - ) { - var P, S, v, L; - if ( - ((v = i[T]), - (L = i[T + 1]), - (P = v * _), - (S = L * a), - P < 0 || S < 0 || _ <= P || a <= S) - ) { - var M = _ + 1; - if (!m) { - (m = !0), - (p = - 0.25 * - (s[2 * (0 + 0 * M)] + - s[2 * (_ + 0 * M)] + - s[2 * (0 + a * M)] + - s[2 * (_ + a * M)])), - (f = - 0.25 * - (s[2 * (0 + 0 * M) + 1] + - s[2 * (_ + 0 * M) + 1] + - s[2 * (0 + a * M) + 1] + - s[2 * (_ + a * M) + 1])); - var E = s[2 * (_ + a * M)] - s[2 * (0 + 0 * M)], - A = s[2 * (_ + a * M) + 1] - s[2 * (0 + 0 * M) + 1], - I = s[2 * (_ + 0 * M)] - s[2 * (0 + a * M)], - w = s[2 * (_ + 0 * M) + 1] - s[2 * (0 + a * M) + 1]; - (c = 0.5 * (E + I)), - (d = 0.5 * (A + w)), - (g = 0.5 * (E - I)), - (y = 0.5 * (A - w)), - (p -= 0.5 * (c + g)), - (f -= 0.5 * (d + y)); - } - if (-2 < v && v < 3 && -2 < L && L < 3) - if (v <= 0) - if (L <= 0) { - var x = s[2 * (0 + 0 * M)], - O = s[2 * (0 + 0 * M) + 1], - D = p - 2 * c, - R = f - 2 * d, - b = p - 2 * g, - F = f - 2 * y, - C = p - 2 * c - 2 * g, - N = f - 2 * d - 2 * y, - B = 0.5 * (v - -2), - U = 0.5 * (L - -2); - B + U <= 1 - ? ((e[T] = C + (b - C) * B + (D - C) * U), - (e[T + 1] = N + (F - N) * B + (R - N) * U)) - : ((e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U)), - (e[T + 1] = - O + (R - O) * (1 - B) + (F - O) * (1 - U))); - } else if (L >= 1) { - var b = s[2 * (0 + a * M)], - F = s[2 * (0 + a * M) + 1], - C = p - 2 * c + 1 * g, - N = f - 2 * d + 1 * y, - x = p + 3 * g, - O = f + 3 * y, - D = p - 2 * c + 3 * g, - R = f - 2 * d + 3 * y, - B = 0.5 * (v - -2), - U = 0.5 * (L - 1); - B + U <= 1 - ? ((e[T] = C + (b - C) * B + (D - C) * U), - (e[T + 1] = N + (F - N) * B + (R - N) * U)) - : ((e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U)), - (e[T + 1] = - O + (R - O) * (1 - B) + (F - O) * (1 - U))); - } else { - var G = 0 | S; - G == a && (G = a - 1); - var B = 0.5 * (v - -2), - U = S - G, - Y = G / a, - k = (G + 1) / a, - b = s[2 * (0 + G * M)], - F = s[2 * (0 + G * M) + 1], - x = s[2 * (0 + (G + 1) * M)], - O = s[2 * (0 + (G + 1) * M) + 1], - C = p - 2 * c + Y * g, - N = f - 2 * d + Y * y, - D = p - 2 * c + k * g, - R = f - 2 * d + k * y; - B + U <= 1 - ? ((e[T] = C + (b - C) * B + (D - C) * U), - (e[T + 1] = N + (F - N) * B + (R - N) * U)) - : ((e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U)), - (e[T + 1] = - O + (R - O) * (1 - B) + (F - O) * (1 - U))); - } - else if (1 <= v) - if (L <= 0) { - var D = s[2 * (_ + 0 * M)], - R = s[2 * (_ + 0 * M) + 1], - x = p + 3 * c, - O = f + 3 * d, - C = p + 1 * c - 2 * g, - N = f + 1 * d - 2 * y, - b = p + 3 * c - 2 * g, - F = f + 3 * d - 2 * y, - B = 0.5 * (v - 1), - U = 0.5 * (L - -2); - B + U <= 1 - ? ((e[T] = C + (b - C) * B + (D - C) * U), - (e[T + 1] = N + (F - N) * B + (R - N) * U)) - : ((e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U)), - (e[T + 1] = - O + (R - O) * (1 - B) + (F - O) * (1 - U))); - } else if (L >= 1) { - var C = s[2 * (_ + a * M)], - N = s[2 * (_ + a * M) + 1], - b = p + 3 * c + 1 * g, - F = f + 3 * d + 1 * y, - D = p + 1 * c + 3 * g, - R = f + 1 * d + 3 * y, - x = p + 3 * c + 3 * g, - O = f + 3 * d + 3 * y, - B = 0.5 * (v - 1), - U = 0.5 * (L - 1); - B + U <= 1 - ? ((e[T] = C + (b - C) * B + (D - C) * U), - (e[T + 1] = N + (F - N) * B + (R - N) * U)) - : ((e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U)), - (e[T + 1] = - O + (R - O) * (1 - B) + (F - O) * (1 - U))); - } else { - var G = 0 | S; - G == a && (G = a - 1); - var B = 0.5 * (v - 1), - U = S - G, - Y = G / a, - k = (G + 1) / a, - C = s[2 * (_ + G * M)], - N = s[2 * (_ + G * M) + 1], - D = s[2 * (_ + (G + 1) * M)], - R = s[2 * (_ + (G + 1) * M) + 1], - b = p + 3 * c + Y * g, - F = f + 3 * d + Y * y, - x = p + 3 * c + k * g, - O = f + 3 * d + k * y; - B + U <= 1 - ? ((e[T] = C + (b - C) * B + (D - C) * U), - (e[T + 1] = N + (F - N) * B + (R - N) * U)) - : ((e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U)), - (e[T + 1] = - O + (R - O) * (1 - B) + (F - O) * (1 - U))); - } - else if (L <= 0) { - var V = 0 | P; - V == _ && (V = _ - 1); - var B = P - V, - U = 0.5 * (L - -2), - X = V / _, - z = (V + 1) / _, - D = s[2 * (V + 0 * M)], - R = s[2 * (V + 0 * M) + 1], - x = s[2 * (V + 1 + 0 * M)], - O = s[2 * (V + 1 + 0 * M) + 1], - C = p + X * c - 2 * g, - N = f + X * d - 2 * y, - b = p + z * c - 2 * g, - F = f + z * d - 2 * y; - B + U <= 1 - ? ((e[T] = C + (b - C) * B + (D - C) * U), - (e[T + 1] = N + (F - N) * B + (R - N) * U)) - : ((e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U)), - (e[T + 1] = O + (R - O) * (1 - B) + (F - O) * (1 - U))); - } else if (L >= 1) { - var V = 0 | P; - V == _ && (V = _ - 1); - var B = P - V, - U = 0.5 * (L - 1), - X = V / _, - z = (V + 1) / _, - C = s[2 * (V + a * M)], - N = s[2 * (V + a * M) + 1], - b = s[2 * (V + 1 + a * M)], - F = s[2 * (V + 1 + a * M) + 1], - D = p + X * c + 3 * g, - R = f + X * d + 3 * y, - x = p + z * c + 3 * g, - O = f + z * d + 3 * y; - B + U <= 1 - ? ((e[T] = C + (b - C) * B + (D - C) * U), - (e[T + 1] = N + (F - N) * B + (R - N) * U)) - : ((e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U)), - (e[T + 1] = O + (R - O) * (1 - B) + (F - O) * (1 - U))); - } else - t.err.printf( - "_$li calc : %.4f , %.4f\t\t\t\t\t@@BDBoxGrid\n", - v, - L - ); - else (e[T] = p + v * c + L * g), (e[T + 1] = f + v * d + L * y); - } else - (l = P - (0 | P)), - ($ = S - (0 | S)), - (h = 2 * ((0 | P) + (0 | S) * (_ + 1))), - l + $ < 1 - ? ((e[T] = - s[h] * (1 - l - $) + - s[h + 2] * l + - s[h + 2 * (_ + 1)] * $), - (e[T + 1] = - s[h + 1] * (1 - l - $) + - s[h + 3] * l + - s[h + 2 * (_ + 1) + 1] * $)) - : ((e[T] = - s[h + 2 * (_ + 1) + 2] * (l - 1 + $) + - s[h + 2 * (_ + 1)] * (1 - l) + - s[h + 2] * (1 - $)), - (e[T + 1] = - s[h + 2 * (_ + 1) + 3] * (l - 1 + $) + - s[h + 2 * (_ + 1) + 1] * (1 - l) + - s[h + 3] * (1 - $))); - } - }), - (Z.prototype.transformPoints_sdk1 = function (t, i, e, r, o, n, s) { - for ( - var _, - a, - h, - l, - $, - u, - p, - f = i, - c = this._$o, - d = this._$A, - g = o * s, - y = null != f._$hr ? f._$hr : f._$Cr, - m = n; - m < g; - m += s - ) - at._$ts - ? ((_ = e[m]), - (a = e[m + 1]), - _ < 0 ? (_ = 0) : _ > 1 && (_ = 1), - a < 0 ? (a = 0) : a > 1 && (a = 1), - (_ *= c), - (a *= d), - (h = 0 | _), - (l = 0 | a), - h > c - 1 && (h = c - 1), - l > d - 1 && (l = d - 1), - (u = _ - h), - (p = a - l), - ($ = 2 * (h + l * (c + 1)))) - : ((_ = e[m] * c), - (a = e[m + 1] * d), - (u = _ - (0 | _)), - (p = a - (0 | a)), - ($ = 2 * ((0 | _) + (0 | a) * (c + 1)))), - u + p < 1 - ? ((r[m] = - y[$] * (1 - u - p) + - y[$ + 2] * u + - y[$ + 2 * (c + 1)] * p), - (r[m + 1] = - y[$ + 1] * (1 - u - p) + - y[$ + 3] * u + - y[$ + 2 * (c + 1) + 1] * p)) - : ((r[m] = - y[$ + 2 * (c + 1) + 2] * (u - 1 + p) + - y[$ + 2 * (c + 1)] * (1 - u) + - y[$ + 2] * (1 - p)), - (r[m + 1] = - y[$ + 2 * (c + 1) + 3] * (u - 1 + p) + - y[$ + 2 * (c + 1) + 1] * (1 - u) + - y[$ + 3] * (1 - p))); - }), - (Z.prototype._$VT = function () { - return (this._$o + 1) * (this._$A + 1); - }), - (Z.prototype.getType = function () { - return I._$_b; - }), - (K.prototype = new _t()), - (tt._$42 = 0), - (tt.prototype._$zP = function () { - (this._$3S = new Array()), (this._$aS = new Array()); - }), - (tt.prototype._$F0 = function (t) { - (this._$g0 = t._$8L()), - (this.visible = t._$8L()), - (this._$NL = t._$nP()), - (this._$3S = t._$nP()), - (this._$aS = t._$nP()); - }), - (tt.prototype.init = function (t) { - var i = new it(this); - return i.setPartsOpacity(this.isVisible() ? 1 : 0), i; - }), - (tt.prototype._$6o = function (t) { - if (null == this._$3S) throw new Error("_$3S _$6 _$Wo@_$6o"); - this._$3S.push(t); - }), - (tt.prototype._$3o = function (t) { - if (null == this._$aS) throw new Error("_$aS _$6 _$Wo@_$3o"); - this._$aS.push(t); - }), - (tt.prototype._$Zo = function (t) { - this._$3S = t; - }), - (tt.prototype._$xo = function (t) { - this._$aS = t; - }), - (tt.prototype.isVisible = function () { - return this.visible; - }), - (tt.prototype._$uL = function () { - return this._$g0; - }), - (tt.prototype._$KP = function (t) { - this.visible = t; - }), - (tt.prototype._$ET = function (t) { - this._$g0 = t; - }), - (tt.prototype.getBaseData = function () { - return this._$3S; - }), - (tt.prototype.getDrawData = function () { - return this._$aS; - }), - (tt.prototype._$p2 = function () { - return this._$NL; - }), - (tt.prototype._$ob = function (t) { - this._$NL = t; - }), - (tt.prototype.getPartsID = function () { - return this._$NL; - }), - (tt.prototype._$MP = function (t) { - this._$NL = t; - }), - (it.prototype = new $()), - (it.prototype.getPartsOpacity = function () { - return this._$VS; - }), - (it.prototype.setPartsOpacity = function (t) { - this._$VS = t; - }), - (et._$L7 = function () { - u._$27(), yt._$27(), b._$27(), l._$27(); - }), - (et.prototype.toString = function () { - return this.id; - }), - (rt.prototype._$F0 = function (t) {}), - (ot.prototype._$1s = function () { - return this._$4S; - }), - (ot.prototype._$zP = function () { - this._$4S = new Array(); - }), - (ot.prototype._$F0 = function (t) { - this._$4S = t._$nP(); - }), - (ot.prototype._$Ks = function (t) { - this._$4S.push(t); - }), - (nt.tr = new gt()), - (nt._$50 = new gt()), - (nt._$Ti = new Array(0, 0)), - (nt._$Pi = new Array(0, 0)), - (nt._$B = new Array(0, 0)), - (nt.prototype._$lP = function (t, i, e, r) { - this.viewport = new Array(t, i, e, r); - }), - (nt.prototype._$bL = function () { - this.context.save(); - var t = this.viewport; - null != t && - (this.context.beginPath(), - this.context._$Li(t[0], t[1], t[2], t[3]), - this.context.clip()); - }), - (nt.prototype._$ei = function () { - this.context.restore(); - }), - (nt.prototype.drawElements = function (t, i, e, r, o, n, s, a) { - try { - o != this._$Qo && - ((this._$Qo = o), (this.context.globalAlpha = o)); - for ( - var h = i.length, - l = t.width, - $ = t.height, - u = this.context, - p = this._$xP, - f = this._$uP, - c = this._$6r, - d = this._$3r, - g = nt.tr, - y = nt._$Ti, - m = nt._$Pi, - T = nt._$B, - P = 0; - P < h; - P += 3 - ) { - u.save(); - var S = i[P], - v = i[P + 1], - L = i[P + 2], - M = p + c * e[2 * S], - E = f + d * e[2 * S + 1], - A = p + c * e[2 * v], - I = f + d * e[2 * v + 1], - w = p + c * e[2 * L], - x = f + d * e[2 * L + 1]; - s && - (s._$PS(M, E, T), - (M = T[0]), - (E = T[1]), - s._$PS(A, I, T), - (A = T[0]), - (I = T[1]), - s._$PS(w, x, T), - (w = T[0]), - (x = T[1])); - var O = l * r[2 * S], - D = $ - $ * r[2 * S + 1], - R = l * r[2 * v], - b = $ - $ * r[2 * v + 1], - F = l * r[2 * L], - C = $ - $ * r[2 * L + 1], - N = Math.atan2(b - D, R - O), - B = Math.atan2(I - E, A - M), - U = A - M, - G = I - E, - Y = Math.sqrt(U * U + G * G), - k = R - O, - V = b - D, - X = Math.sqrt(k * k + V * V), - z = Y / X; - It._$ni(F, C, O, D, R - O, b - D, -(b - D), R - O, y), - It._$ni(w, x, M, E, A - M, I - E, -(I - E), A - M, m); - var H = (m[0] - y[0]) / y[1], - W = Math.min(O, R, F), - j = Math.max(O, R, F), - q = Math.min(D, b, C), - J = Math.max(D, b, C), - Q = Math.floor(W), - Z = Math.floor(q), - K = Math.ceil(j), - tt = Math.ceil(J); - g.identity(), - g.translate(M, E), - g.rotate(B), - g.scale(1, m[1] / y[1]), - g.shear(H, 0), - g.scale(z, z), - g.rotate(-N), - g.translate(-O, -D), - g.setContext(u); - if ( - (n || (n = 1.2), - at.IGNORE_EXPAND && (n = 0), - at.USE_CACHED_POLYGON_IMAGE) - ) { - var it = a._$e0; - if ( - ((it.gl_cacheImage = it.gl_cacheImage || {}), - !it.gl_cacheImage[P]) - ) { - var et = nt.createCanvas(K - Q, tt - Z); - (at.DEBUG_DATA.LDGL_CANVAS_MB = - at.DEBUG_DATA.LDGL_CANVAS_MB || 0), - (at.DEBUG_DATA.LDGL_CANVAS_MB += (K - Q) * (tt - Z) * 4); - var rt = et.getContext("2d"); - rt.translate(-Q, -Z), - nt.clip(rt, g, n, Y, O, D, R, b, F, C, M, E, A, I, w, x), - rt.drawImage(t, 0, 0), - (it.gl_cacheImage[P] = { - cacheCanvas: et, - cacheContext: rt, - }); - } - u.drawImage(it.gl_cacheImage[P].cacheCanvas, Q, Z); - } else - at.IGNORE_CLIP || - nt.clip(u, g, n, Y, O, D, R, b, F, C, M, E, A, I, w, x), - at.USE_ADJUST_TRANSLATION && - ((W = 0), (j = l), (q = 0), (J = $)), - u.drawImage(t, W, q, j - W, J - q, W, q, j - W, J - q); - u.restore(); - } - } catch (t) { - _._$Rb(t); - } - }), - (nt.clip = function (t, i, e, r, o, n, s, _, a, h, l, $, u, p, f, c) { - e > 0.02 - ? nt.expandClip(t, i, e, r, l, $, u, p, f, c) - : nt.clipWithTransform(t, null, o, n, s, _, a, h); - }), - (nt.expandClip = function (t, i, e, r, o, n, s, _, a, h) { - var l = s - o, - $ = _ - n, - u = a - o, - p = h - n, - f = l * p - $ * u > 0 ? e : -e, - c = -$, - d = l, - g = a - s, - y = h - _, - m = -y, - T = g, - P = Math.sqrt(g * g + y * y), - S = -p, - v = u, - L = Math.sqrt(u * u + p * p), - M = o - (f * c) / r, - E = n - (f * d) / r, - A = s - (f * c) / r, - I = _ - (f * d) / r, - w = s - (f * m) / P, - x = _ - (f * T) / P, - O = a - (f * m) / P, - D = h - (f * T) / P, - R = o + (f * S) / L, - b = n + (f * v) / L, - F = a + (f * S) / L, - C = h + (f * v) / L, - N = nt._$50; - return ( - null != i._$P2(N) && - (nt.clipWithTransform(t, N, M, E, A, I, w, x, O, D, F, C, R, b), - !0) - ); - }), - (nt.clipWithTransform = function (t, i, e, r, o, n, s, a) { - if (arguments.length < 7) return void _._$li("err : @LDGL.clip()"); - if (!(arguments[1] instanceof gt)) - return void _._$li("err : a[0] is _$6 LDTransform @LDGL.clip()"); - var h = nt._$B, - l = i, - $ = arguments; - if ((t.beginPath(), l)) { - l._$PS($[2], $[3], h), t.moveTo(h[0], h[1]); - for (var u = 4; u < $.length; u += 2) - l._$PS($[u], $[u + 1], h), t.lineTo(h[0], h[1]); - } else { - t.moveTo($[2], $[3]); - for (var u = 4; u < $.length; u += 2) t.lineTo($[u], $[u + 1]); - } - t.clip(); - }), - (nt.createCanvas = function (t, i) { - var e = document.createElement("canvas"); - return ( - e.setAttribute("width", t), - e.setAttribute("height", i), - e || _._$li("err : " + e), - e - ); - }), - (nt.dumpValues = function () { - for (var t = "", i = 0; i < arguments.length; i++) - t += "[" + i + "]= " + arguments[i].toFixed(3) + " , "; - console.log(t); - }), - (st.prototype._$F0 = function (t) { - (this._$TT = t._$_T()), - (this._$LT = t._$_T()), - (this._$FS = t._$_T()), - (this._$wL = t._$nP()); - }), - (st.prototype.getMinValue = function () { - return this._$TT; - }), - (st.prototype.getMaxValue = function () { - return this._$LT; - }), - (st.prototype.getDefaultValue = function () { - return this._$FS; - }), - (st.prototype.getParamID = function () { - return this._$wL; - }), - (_t.prototype._$yo = function () { - return this._$AT && !this._$JS; - }), - (_t.prototype._$hS = function (t) { - this._$AT = t; - }), - (_t.prototype._$GT = function () { - return this._$e0; - }), - (_t.prototype._$l2 = function (t) { - this._$IP = t; - }), - (_t.prototype.getPartsIndex = function () { - return this._$IP; - }), - (_t.prototype._$x2 = function () { - return this._$JS; - }), - (_t.prototype._$Ib = function (t) { - this._$JS = t; - }), - (_t.prototype.getTotalScale = function () { - return this.totalScale; - }), - (_t.prototype.setTotalScale_notForClient = function (t) { - this.totalScale = t; - }), - (_t.prototype.getInterpolatedOpacity = function () { - return this._$7s; - }), - (_t.prototype.setInterpolatedOpacity = function (t) { - this._$7s = t; - }), - (_t.prototype.getTotalOpacity = function (t) { - return this.totalOpacity; - }), - (_t.prototype.setTotalOpacity = function (t) { - this.totalOpacity = t; - }), - (at._$2s = "2.1.00_1"), - (at._$Kr = 201001e3), - (at._$sP = !0), - (at._$so = !0), - (at._$cb = !1), - (at._$3T = !0), - (at._$Ts = !0), - (at._$fb = !0), - (at._$ts = !0), - (at.L2D_DEFORMER_EXTEND = !0), - (at._$Wb = !1); - (at._$yr = !1), - (at._$Zs = !1), - (at.L2D_NO_ERROR = 0), - (at._$i7 = 1e3), - (at._$9s = 1001), - (at._$es = 1100), - (at._$r7 = 2e3), - (at._$07 = 2001), - (at._$b7 = 2002), - (at._$H7 = 4e3), - (at.L2D_COLOR_BLEND_MODE_MULT = 0), - (at.L2D_COLOR_BLEND_MODE_ADD = 1), - (at.L2D_COLOR_BLEND_MODE_INTERPOLATE = 2), - (at._$6b = !0), - (at._$cT = 0), - (at.clippingMaskBufferSize = 256), - (at.glContext = new Array()), - (at.frameBuffers = new Array()), - (at.fTexture = new Array()), - (at.IGNORE_CLIP = !1), - (at.IGNORE_EXPAND = !1), - (at.EXPAND_W = 2), - (at.USE_ADJUST_TRANSLATION = !0), - (at.USE_CANVAS_TRANSFORM = !0), - (at.USE_CACHED_POLYGON_IMAGE = !1), - (at.DEBUG_DATA = {}), - (at.PROFILE_IOS_SPEED = { - PROFILE_NAME: "iOS Speed", - USE_ADJUST_TRANSLATION: !0, - USE_CACHED_POLYGON_IMAGE: !0, - EXPAND_W: 4, - }), - (at.PROFILE_IOS_QUALITY = { - PROFILE_NAME: "iOS HiQ", - USE_ADJUST_TRANSLATION: !0, - USE_CACHED_POLYGON_IMAGE: !1, - EXPAND_W: 2, - }), - (at.PROFILE_IOS_DEFAULT = at.PROFILE_IOS_QUALITY), - (at.PROFILE_ANDROID = { - PROFILE_NAME: "Android", - USE_ADJUST_TRANSLATION: !1, - USE_CACHED_POLYGON_IMAGE: !1, - EXPAND_W: 2, - }), - (at.PROFILE_DESKTOP = { - PROFILE_NAME: "Desktop", - USE_ADJUST_TRANSLATION: !1, - USE_CACHED_POLYGON_IMAGE: !1, - EXPAND_W: 2, - }), - (at.initProfile = function () { - Et.isIOS() - ? at.setupProfile(at.PROFILE_IOS_DEFAULT) - : Et.isAndroid() - ? at.setupProfile(at.PROFILE_ANDROID) - : at.setupProfile(at.PROFILE_DESKTOP); - }), - (at.setupProfile = function (t, i) { - if ("number" == typeof t) - switch (t) { - case 9901: - t = at.PROFILE_IOS_SPEED; - break; - case 9902: - t = at.PROFILE_IOS_QUALITY; - break; - case 9903: - t = at.PROFILE_IOS_DEFAULT; - break; - case 9904: - t = at.PROFILE_ANDROID; - break; - case 9905: - t = at.PROFILE_DESKTOP; - break; - default: - alert("profile _$6 _$Ui : " + t); - } - arguments.length < 2 && (i = !0), - i && console.log("profile : " + t.PROFILE_NAME); - for (var e in t) - (at[e] = t[e]), i && console.log(" [" + e + "] = " + t[e]); - }), - (at.init = function () { - if (at._$6b) { - console.log("Live2D %s", at._$2s), (at._$6b = !1); - !0, at.initProfile(); - } - }), - (at.getVersionStr = function () { - return at._$2s; - }), - (at.getVersionNo = function () { - return at._$Kr; - }), - (at._$sT = function (t) { - at._$cT = t; - }), - (at.getError = function () { - var t = at._$cT; - return (at._$cT = 0), t; - }), - (at.dispose = function () { - (at.glContext = []), (at.frameBuffers = []), (at.fTexture = []); - }), - (at.setGL = function (t, i) { - var e = i || 0; - at.glContext[e] = t; - }), - (at.getGL = function (t) { - return at.glContext[t]; - }), - (at.setClippingMaskBufferSize = function (t) { - at.clippingMaskBufferSize = t; - }), - (at.getClippingMaskBufferSize = function () { - return at.clippingMaskBufferSize; - }), - (at.deleteBuffer = function (t) { - at.getGL(t).deleteFramebuffer(at.frameBuffers[t].framebuffer), - delete at.frameBuffers[t], - delete at.glContext[t]; - }), - (ht._$r2 = function (t) { - return t < 0 ? 0 : t > 1 ? 1 : 0.5 - 0.5 * Math.cos(t * Lt.PI_F); - }), - (lt._$fr = -1), - (lt.prototype.toString = function () { - return this._$ib; - }), - ($t.prototype = new W()), - ($t._$42 = 0), - ($t._$Os = 30), - ($t._$ms = 0), - ($t._$ns = 1), - ($t._$_s = 2), - ($t._$gT = new Array()), - ($t.prototype._$_S = function (t) { - this._$LP = t; - }), - ($t.prototype.getTextureNo = function () { - return this._$LP; - }), - ($t.prototype._$ZL = function () { - return this._$Qi; - }), - ($t.prototype._$H2 = function () { - return this._$JP; - }), - ($t.prototype.getNumPoints = function () { - return this._$d0; - }), - ($t.prototype.getType = function () { - return W._$wb; - }), - ($t.prototype._$B2 = function (t, i, e) { - var r = i, - o = null != r._$hr ? r._$hr : r._$Cr; - switch (U._$do) { - default: - case U._$Ms: - throw new Error("_$L _$ro "); - case U._$Qs: - for (var n = this._$d0 - 1; n >= 0; --n) o[n * U._$No + 4] = e; - } - }), - ($t.prototype._$zP = function () { - (this._$GS = new D()), this._$GS._$zP(); - }), - ($t.prototype._$F0 = function (t) { - W.prototype._$F0.call(this, t), - (this._$LP = t._$6L()), - (this._$d0 = t._$6L()), - (this._$Yo = t._$6L()); - var i = t._$nP(); - this._$BP = new Int16Array(3 * this._$Yo); - for (var e = 3 * this._$Yo - 1; e >= 0; --e) this._$BP[e] = i[e]; - if ( - ((this._$Eo = t._$nP()), - (this._$Qi = t._$nP()), - t.getFormatVersion() >= G._$s7) - ) { - if (((this._$JP = t._$6L()), 0 != this._$JP)) { - if (0 != (1 & this._$JP)) { - var r = t._$6L(); - null == this._$5P && (this._$5P = new Object()), - (this._$5P._$Hb = parseInt(r)); - } - 0 != (this._$JP & $t._$Os) - ? (this._$6s = (this._$JP & $t._$Os) >> 1) - : (this._$6s = $t._$ms), - 0 != (32 & this._$JP) && (this.culling = !1); - } - } else this._$JP = 0; - }), - ($t.prototype.init = function (t) { - var i = new ut(this), - e = this._$d0 * U._$No, - r = this._$32(); - switch ( - (null != i._$Cr && (i._$Cr = null), - (i._$Cr = new Float32Array(e)), - null != i._$hr && (i._$hr = null), - (i._$hr = r ? new Float32Array(e) : null), - U._$do) - ) { - default: - case U._$Ms: - if (U._$Ls) - for (var o = this._$d0 - 1; o >= 0; --o) { - var n = o << 1; - this._$Qi[n + 1] = 1 - this._$Qi[n + 1]; - } - break; - case U._$Qs: - for (var o = this._$d0 - 1; o >= 0; --o) { - var n = o << 1, - s = o * U._$No, - _ = this._$Qi[n], - a = this._$Qi[n + 1]; - (i._$Cr[s] = _), - (i._$Cr[s + 1] = a), - (i._$Cr[s + 4] = 0), - r && - ((i._$hr[s] = _), - (i._$hr[s + 1] = a), - (i._$hr[s + 4] = 0)); - } - } - return i; - }), - ($t.prototype._$Nr = function (t, i) { - var e = i; - if ( - (this != e._$GT() && console.log("### assert!! ### "), - this._$GS._$Ur(t) && - (W.prototype._$Nr.call(this, t, e), !e._$IS[0])) - ) { - var r = $t._$gT; - (r[0] = !1), - v._$Vr( - t, - this._$GS, - r, - this._$d0, - this._$Eo, - e._$Cr, - U._$i2, - U._$No - ); - } - }), - ($t.prototype._$2b = function (t, i) { - try { - this != i._$GT() && console.log("### assert!! ### "); - var e = !1; - i._$IS[0] && (e = !0); - var r = i; - if (!e && (W.prototype._$2b.call(this, t), this._$32())) { - var o = this.getTargetBaseDataID(); - if ( - (r._$8r == W._$ur && (r._$8r = t.getBaseDataIndex(o)), - r._$8r < 0) - ) - at._$so && _._$li("_$L _$0P _$G :: %s", o); - else { - var n = t.getBaseData(r._$8r), - s = t._$q2(r._$8r); - null == n || s._$x2() - ? (r._$AT = !1) - : (n._$nb(t, s, r._$Cr, r._$hr, this._$d0, U._$i2, U._$No), - (r._$AT = !0)), - (r.baseOpacity = s.getTotalOpacity()); - } - } - } catch (t) { - throw t; - } - }), - ($t.prototype.draw = function (t, i, e) { - if ( - (this != e._$GT() && console.log("### assert!! ### "), !e._$IS[0]) - ) { - var r = e, - o = this._$LP; - o < 0 && (o = 1); - var n = this.getOpacity(i, r) * e._$VS * e.baseOpacity, - s = null != r._$hr ? r._$hr : r._$Cr; - t.setClipBufPre_clipContextForDraw(e.clipBufPre_clipContext), - t._$WP(this.culling), - t._$Uo( - o, - 3 * this._$Yo, - this._$BP, - s, - this._$Qi, - n, - this._$6s, - r - ); - } - }), - ($t.prototype.dump = function () { - console.log( - " _$yi( %d ) , _$d0( %d ) , _$Yo( %d ) \n", - this._$LP, - this._$d0, - this._$Yo - ), - console.log(" _$Oi _$di = { "); - for (var t = 0; t < this._$BP.length; t++) - console.log("%5d ,", this._$BP[t]); - console.log("\n _$5i _$30"); - for (var t = 0; t < this._$Eo.length; t++) { - console.log("\n _$30[%d] = ", t); - for (var i = this._$Eo[t], e = 0; e < i.length; e++) - console.log("%6.2f, ", i[e]); - } - console.log("\n"); - }), - ($t.prototype._$72 = function (t) { - return null == this._$5P ? null : this._$5P[t]; - }), - ($t.prototype.getIndexArray = function () { - return this._$BP; - }), - (ut.prototype = new Mt()), - (ut.prototype.getTransformedPoints = function () { - return null != this._$hr ? this._$hr : this._$Cr; - }), - (pt.prototype._$HT = function (t) { - (this.x = t.x), (this.y = t.y); - }), - (pt.prototype._$HT = function (t, i) { - (this.x = t), (this.y = i); - }), - (ft.prototype = new i()), - (ft.loadModel = function (t) { - var e = new ft(); - return i._$62(e, t), e; - }), - (ft.loadModel = function (t, e) { - var r = e || 0, - o = new ft(r); - return i._$62(o, t), o; - }), - (ft._$to = function () { - return new ft(); - }), - (ft._$er = function (t) { - var i = new _$5("../_$_r/_$t0/_$Ri/_$_P._$d"); - if (0 == i.exists()) - throw new _$ls("_$t0 _$_ _$6 _$Ui :: " + i._$PL()); - for ( - var e = [ - "../_$_r/_$t0/_$Ri/_$_P.512/_$CP._$1", - "../_$_r/_$t0/_$Ri/_$_P.512/_$vP._$1", - "../_$_r/_$t0/_$Ri/_$_P.512/_$EP._$1", - "../_$_r/_$t0/_$Ri/_$_P.512/_$pP._$1", - ], - r = ft.loadModel(i._$3b()), - o = 0; - o < e.length; - o++ - ) { - var n = new _$5(e[o]); - if (0 == n.exists()) - throw new _$ls("_$t0 _$_ _$6 _$Ui :: " + n._$PL()); - r.setTexture(o, _$nL._$_o(t, n._$3b())); - } - return r; - }), - (ft.prototype.setGL = function (t) { - at.setGL(t); - }), - (ft.prototype.setTransform = function (t) { - this.drawParamWebGL.setTransform(t); - }), - (ft.prototype.update = function () { - this._$5S.update(), this._$5S.preDraw(this.drawParamWebGL); - }), - (ft.prototype.draw = function () { - this._$5S.draw(this.drawParamWebGL); - }), - (ft.prototype._$K2 = function () { - this.drawParamWebGL._$K2(); - }), - (ft.prototype.setTexture = function (t, i) { - null == this.drawParamWebGL && - _._$li("_$Yi for QT _$ki / _$XS() is _$6 _$ui!!"), - this.drawParamWebGL.setTexture(t, i); - }), - (ft.prototype.setTexture = function (t, i) { - null == this.drawParamWebGL && - _._$li("_$Yi for QT _$ki / _$XS() is _$6 _$ui!!"), - this.drawParamWebGL.setTexture(t, i); - }), - (ft.prototype._$Rs = function () { - return this.drawParamWebGL._$Rs(); - }), - (ft.prototype._$Ds = function (t) { - this.drawParamWebGL._$Ds(t); - }), - (ft.prototype.getDrawParam = function () { - return this.drawParamWebGL; - }), - (ft.prototype.setMatrix = function (t) { - this.drawParamWebGL.setMatrix(t); - }), - (ft.prototype.setPremultipliedAlpha = function (t) { - this.drawParamWebGL.setPremultipliedAlpha(t); - }), - (ft.prototype.isPremultipliedAlpha = function () { - return this.drawParamWebGL.isPremultipliedAlpha(); - }), - (ft.prototype.setAnisotropy = function (t) { - this.drawParamWebGL.setAnisotropy(t); - }), - (ft.prototype.getAnisotropy = function () { - return this.drawParamWebGL.getAnisotropy(); - }), - (ct.prototype._$tb = function () { - return this.motions; - }), - (ct.prototype.startMotion = function (t, i) { - for (var e = null, r = this.motions.length, o = 0; o < r; ++o) - null != (e = this.motions[o]) && - (e._$qS(e._$w0.getFadeOut()), - this._$eb && - _._$Ji( - "MotionQueueManager[size:%2d]->startMotion() / start _$K _$3 (m%d)\n", - r, - e._$sr - )); - if (null == t) return -1; - (e = new dt()), (e._$w0 = t), this.motions.push(e); - var n = e._$sr; - return ( - this._$eb && - _._$Ji( - "MotionQueueManager[size:%2d]->startMotion() / new _$w0 (m%d)\n", - r, - n - ), - n - ); - }), - (ct.prototype.updateParam = function (t) { - try { - for (var i = !1, e = 0; e < this.motions.length; e++) { - var r = this.motions[e]; - if (null != r) { - var o = r._$w0; - null != o - ? (o.updateParam(t, r), - (i = !0), - r.isFinished() && - (this._$eb && - _._$Ji( - "MotionQueueManager[size:%2d]->updateParam() / _$T0 _$w0 (m%d)\n", - this.motions.length - 1, - r._$sr - ), - this.motions.splice(e, 1), - e--)) - : ((this.motions = this.motions.splice(e, 1)), e--); - } else this.motions.splice(e, 1), e--; - } - return i; - } catch (t) { - return _._$li(t), !0; - } - }), - (ct.prototype.isFinished = function (t) { - if (arguments.length >= 1) { - for (var i = 0; i < this.motions.length; i++) { - var e = this.motions[i]; - if (null != e && e._$sr == t && !e.isFinished()) return !1; - } - return !0; - } - for (var i = 0; i < this.motions.length; i++) { - var e = this.motions[i]; - if (null != e) { - if (null != e._$w0) { - if (!e.isFinished()) return !1; - } else this.motions.splice(i, 1), i--; - } else this.motions.splice(i, 1), i--; - } - return !0; - }), - (ct.prototype.stopAllMotions = function () { - for (var t = 0; t < this.motions.length; t++) { - var i = this.motions[t]; - if (null != i) { - i._$w0; - this.motions.splice(t, 1), t--; - } else this.motions.splice(t, 1), t--; - } - }), - (ct.prototype._$Zr = function (t) { - this._$eb = t; - }), - (ct.prototype._$e = function () { - console.log("-- _$R --\n"); - for (var t = 0; t < this.motions.length; t++) { - var i = this.motions[t], - e = i._$w0; - console.log( - "MotionQueueEnt[%d] :: %s\n", - this.motions.length, - e.toString() - ); - } - }), - (dt._$Gs = 0), - (dt.prototype.isFinished = function () { - return this._$9L; - }), - (dt.prototype._$qS = function (t) { - var i = w.getUserTimeMSec(), - e = i + t; - (this._$Do < 0 || e < this._$Do) && (this._$Do = e); - }), - (dt.prototype._$Bs = function () { - return this._$sr; - }), - (gt.prototype.setContext = function (t) { - var i = this.m; - t.transform(i[0], i[1], i[3], i[4], i[6], i[7]); - }), - (gt.prototype.toString = function () { - for (var t = "LDTransform { ", i = 0; i < 9; i++) - t += this.m[i].toFixed(2) + " ,"; - return (t += " }"); - }), - (gt.prototype.identity = function () { - var t = this.m; - (t[0] = t[4] = t[8] = 1), - (t[1] = t[2] = t[3] = t[5] = t[6] = t[7] = 0); - }), - (gt.prototype._$PS = function (t, i, e) { - null == e && (e = new Array(0, 0)); - var r = this.m; - return ( - (e[0] = r[0] * t + r[3] * i + r[6]), - (e[1] = r[1] * t + r[4] * i + r[7]), - e - ); - }), - (gt.prototype._$P2 = function (t) { - t || (t = new gt()); - var i = this.m, - e = i[0], - r = i[1], - o = i[2], - n = i[3], - s = i[4], - _ = i[5], - a = i[6], - h = i[7], - l = i[8], - $ = - e * s * l + - r * _ * a + - o * n * h - - e * _ * h - - o * s * a - - r * n * l; - if (0 == $) return null; - var u = 1 / $; - return ( - (t.m[0] = u * (s * l - h * _)), - (t.m[1] = u * (h * o - r * l)), - (t.m[2] = u * (r * _ - s * o)), - (t.m[3] = u * (a * _ - n * l)), - (t.m[4] = u * (e * l - a * o)), - (t.m[5] = u * (n * o - e * _)), - (t.m[6] = u * (n * h - a * s)), - (t.m[7] = u * (a * r - e * h)), - (t.m[8] = u * (e * s - n * r)), - t - ); - }), - (gt.prototype.transform = function (t, i, e) { - null == e && (e = new Array(0, 0)); - var r = this.m; - return ( - (e[0] = r[0] * t + r[3] * i + r[6]), - (e[1] = r[1] * t + r[4] * i + r[7]), - e - ); - }), - (gt.prototype.translate = function (t, i) { - var e = this.m; - (e[6] = e[0] * t + e[3] * i + e[6]), - (e[7] = e[1] * t + e[4] * i + e[7]), - (e[8] = e[2] * t + e[5] * i + e[8]); - }), - (gt.prototype.scale = function (t, i) { - var e = this.m; - (e[0] *= t), - (e[1] *= t), - (e[2] *= t), - (e[3] *= i), - (e[4] *= i), - (e[5] *= i); - }), - (gt.prototype.shear = function (t, i) { - var e = this.m, - r = e[0] + e[3] * i, - o = e[1] + e[4] * i, - n = e[2] + e[5] * i; - (e[3] = e[0] * t + e[3]), - (e[4] = e[1] * t + e[4]), - (e[5] = e[2] * t + e[5]), - (e[0] = r), - (e[1] = o), - (e[2] = n); - }), - (gt.prototype.rotate = function (t) { - var i = this.m, - e = Math.cos(t), - r = Math.sin(t), - o = i[0] * e + i[3] * r, - n = i[1] * e + i[4] * r, - s = i[2] * e + i[5] * r; - (i[3] = -i[0] * r + i[3] * e), - (i[4] = -i[1] * r + i[4] * e), - (i[5] = -i[2] * r + i[5] * e), - (i[0] = o), - (i[1] = n), - (i[2] = s); - }), - (gt.prototype.concatenate = function (t) { - var i = this.m, - e = t.m, - r = i[0] * e[0] + i[3] * e[1] + i[6] * e[2], - o = i[1] * e[0] + i[4] * e[1] + i[7] * e[2], - n = i[2] * e[0] + i[5] * e[1] + i[8] * e[2], - s = i[0] * e[3] + i[3] * e[4] + i[6] * e[5], - _ = i[1] * e[3] + i[4] * e[4] + i[7] * e[5], - a = i[2] * e[3] + i[5] * e[4] + i[8] * e[5], - h = i[0] * e[6] + i[3] * e[7] + i[6] * e[8], - l = i[1] * e[6] + i[4] * e[7] + i[7] * e[8], - $ = i[2] * e[6] + i[5] * e[7] + i[8] * e[8]; - (m[0] = r), - (m[1] = o), - (m[2] = n), - (m[3] = s), - (m[4] = _), - (m[5] = a), - (m[6] = h), - (m[7] = l), - (m[8] = $); - }), - (yt.prototype = new et()), - (yt._$eT = null), - (yt._$tP = new Object()), - (yt._$2o = function () { - return null == yt._$eT && (yt._$eT = yt.getID("DST_BASE")), yt._$eT; - }), - (yt._$27 = function () { - yt._$tP.clear(), (yt._$eT = null); - }), - (yt.getID = function (t) { - var i = yt._$tP[t]; - return null == i && ((i = new yt(t)), (yt._$tP[t] = i)), i; - }), - (yt.prototype._$3s = function () { - return new yt(); - }), - (mt.prototype = new E()), - (mt._$9r = function (t) { - return new Float32Array(t); - }), - (mt._$vb = function (t) { - return new Int16Array(t); - }), - (mt._$cr = function (t, i) { - return ( - null == t || t._$yL() < i.length - ? ((t = mt._$9r(2 * i.length)), t.put(i), t._$oT(0)) - : (t.clear(), t.put(i), t._$oT(0)), - t - ); - }), - (mt._$mb = function (t, i) { - return ( - null == t || t._$yL() < i.length - ? ((t = mt._$vb(2 * i.length)), t.put(i), t._$oT(0)) - : (t.clear(), t.put(i), t._$oT(0)), - t - ); - }), - (mt._$Hs = function () { - return this._$Gr; - }), - (mt._$as = function (t) { - this._$Gr = t; - }), - (mt.prototype.getGL = function () { - return this.gl; - }), - (mt.prototype.setGL = function (t) { - this.gl = t; - }), - (mt.prototype.setTransform = function (t) { - this.transform = t; - }), - (mt.prototype._$ZT = function () { - var t = this.gl; - this.firstDraw && - (this.initShader(), - (this.firstDraw = !1), - (this.anisotropyExt = - t.getExtension("EXT_texture_filter_anisotropic") || - t.getExtension("WEBKIT_EXT_texture_filter_anisotropic") || - t.getExtension("MOZ_EXT_texture_filter_anisotropic")), - this.anisotropyExt && - (this.maxAnisotropy = t.getParameter( - this.anisotropyExt.MAX_TEXTURE_MAX_ANISOTROPY_EXT - ))), - t.disable(t.SCISSOR_TEST), - t.disable(t.STENCIL_TEST), - t.disable(t.DEPTH_TEST), - t.frontFace(t.CW), - t.enable(t.BLEND), - t.colorMask(1, 1, 1, 1), - t.bindBuffer(t.ARRAY_BUFFER, null), - t.bindBuffer(t.ELEMENT_ARRAY_BUFFER, null); - }), - (mt.prototype._$Uo = function (t, i, e, r, o, n, s, _) { - if (!(n < 0.01 && null == this.clipBufPre_clipContextMask)) { - var a = (n > 0.9 && at.EXPAND_W, this.gl); - if (null == this.gl) throw new Error("gl is null"); - var h = 1 * this._$C0 * n, - l = 1 * this._$tT * n, - $ = 1 * this._$WL * n, - u = this._$lT * n; - if (null != this.clipBufPre_clipContextMask) { - a.frontFace(a.CCW), - a.useProgram(this.shaderProgram), - (this._$vS = Tt(a, this._$vS, r)), - (this._$no = Pt(a, this._$no, e)), - a.enableVertexAttribArray(this.a_position_Loc), - a.vertexAttribPointer( - this.a_position_Loc, - 2, - a.FLOAT, - !1, - 0, - 0 - ), - (this._$NT = Tt(a, this._$NT, o)), - a.activeTexture(a.TEXTURE1), - a.bindTexture(a.TEXTURE_2D, this.textures[t]), - a.uniform1i(this.s_texture0_Loc, 1), - a.enableVertexAttribArray(this.a_texCoord_Loc), - a.vertexAttribPointer( - this.a_texCoord_Loc, - 2, - a.FLOAT, - !1, - 0, - 0 - ), - a.uniformMatrix4fv( - this.u_matrix_Loc, - !1, - this.getClipBufPre_clipContextMask().matrixForMask - ); - var p = this.getClipBufPre_clipContextMask().layoutChannelNo, - f = this.getChannelFlagAsColor(p); - a.uniform4f(this.u_channelFlag, f.r, f.g, f.b, f.a); - var c = this.getClipBufPre_clipContextMask().layoutBounds; - a.uniform4f( - this.u_baseColor_Loc, - 2 * c.x - 1, - 2 * c.y - 1, - 2 * c._$EL() - 1, - 2 * c._$5T() - 1 - ), - a.uniform1i(this.u_maskFlag_Loc, !0); - } else if (null != this.getClipBufPre_clipContextDraw()) { - a.useProgram(this.shaderProgramOff), - (this._$vS = Tt(a, this._$vS, r)), - (this._$no = Pt(a, this._$no, e)), - a.enableVertexAttribArray(this.a_position_Loc_Off), - a.vertexAttribPointer( - this.a_position_Loc_Off, - 2, - a.FLOAT, - !1, - 0, - 0 - ), - (this._$NT = Tt(a, this._$NT, o)), - a.activeTexture(a.TEXTURE1), - a.bindTexture(a.TEXTURE_2D, this.textures[t]), - a.uniform1i(this.s_texture0_Loc_Off, 1), - a.enableVertexAttribArray(this.a_texCoord_Loc_Off), - a.vertexAttribPointer( - this.a_texCoord_Loc_Off, - 2, - a.FLOAT, - !1, - 0, - 0 - ), - a.uniformMatrix4fv( - this.u_clipMatrix_Loc_Off, - !1, - this.getClipBufPre_clipContextDraw().matrixForDraw - ), - a.uniformMatrix4fv(this.u_matrix_Loc_Off, !1, this.matrix4x4), - a.activeTexture(a.TEXTURE2), - a.bindTexture(a.TEXTURE_2D, at.fTexture[this.glno]), - a.uniform1i(this.s_texture1_Loc_Off, 2); - var p = this.getClipBufPre_clipContextDraw().layoutChannelNo, - f = this.getChannelFlagAsColor(p); - a.uniform4f(this.u_channelFlag_Loc_Off, f.r, f.g, f.b, f.a), - a.uniform4f(this.u_baseColor_Loc_Off, h, l, $, u); - } else - a.useProgram(this.shaderProgram), - (this._$vS = Tt(a, this._$vS, r)), - (this._$no = Pt(a, this._$no, e)), - a.enableVertexAttribArray(this.a_position_Loc), - a.vertexAttribPointer( - this.a_position_Loc, - 2, - a.FLOAT, - !1, - 0, - 0 - ), - (this._$NT = Tt(a, this._$NT, o)), - a.activeTexture(a.TEXTURE1), - a.bindTexture(a.TEXTURE_2D, this.textures[t]), - a.uniform1i(this.s_texture0_Loc, 1), - a.enableVertexAttribArray(this.a_texCoord_Loc), - a.vertexAttribPointer( - this.a_texCoord_Loc, - 2, - a.FLOAT, - !1, - 0, - 0 - ), - a.uniformMatrix4fv(this.u_matrix_Loc, !1, this.matrix4x4), - a.uniform4f(this.u_baseColor_Loc, h, l, $, u), - a.uniform1i(this.u_maskFlag_Loc, !1); - this.culling - ? this.gl.enable(a.CULL_FACE) - : this.gl.disable(a.CULL_FACE), - this.gl.enable(a.BLEND); - var d, g, y, m; - if (null != this.clipBufPre_clipContextMask) - (d = a.ONE), - (g = a.ONE_MINUS_SRC_ALPHA), - (y = a.ONE), - (m = a.ONE_MINUS_SRC_ALPHA); - else - switch (s) { - case $t._$ms: - (d = a.ONE), - (g = a.ONE_MINUS_SRC_ALPHA), - (y = a.ONE), - (m = a.ONE_MINUS_SRC_ALPHA); - break; - case $t._$ns: - (d = a.ONE), (g = a.ONE), (y = a.ZERO), (m = a.ONE); - break; - case $t._$_s: - (d = a.DST_COLOR), - (g = a.ONE_MINUS_SRC_ALPHA), - (y = a.ZERO), - (m = a.ONE); - } - a.blendEquationSeparate(a.FUNC_ADD, a.FUNC_ADD), - a.blendFuncSeparate(d, g, y, m), - this.anisotropyExt && - a.texParameteri( - a.TEXTURE_2D, - this.anisotropyExt.TEXTURE_MAX_ANISOTROPY_EXT, - this.maxAnisotropy - ); - var T = e.length; - a.drawElements(a.TRIANGLES, T, a.UNSIGNED_SHORT, 0), - a.bindTexture(a.TEXTURE_2D, null); - } - }), - (mt.prototype._$Rs = function () { - throw new Error("_$Rs"); - }), - (mt.prototype._$Ds = function (t) { - throw new Error("_$Ds"); - }), - (mt.prototype._$K2 = function () { - for (var t = 0; t < this.textures.length; t++) { - 0 != this.textures[t] && - (this.gl._$K2(1, this.textures, t), (this.textures[t] = null)); - } - }), - (mt.prototype.setTexture = function (t, i) { - this.textures[t] = i; - }), - (mt.prototype.initShader = function () { - var t = this.gl; - this.loadShaders2(), - (this.a_position_Loc = t.getAttribLocation( - this.shaderProgram, - "a_position" - )), - (this.a_texCoord_Loc = t.getAttribLocation( - this.shaderProgram, - "a_texCoord" - )), - (this.u_matrix_Loc = t.getUniformLocation( - this.shaderProgram, - "u_mvpMatrix" - )), - (this.s_texture0_Loc = t.getUniformLocation( - this.shaderProgram, - "s_texture0" - )), - (this.u_channelFlag = t.getUniformLocation( - this.shaderProgram, - "u_channelFlag" - )), - (this.u_baseColor_Loc = t.getUniformLocation( - this.shaderProgram, - "u_baseColor" - )), - (this.u_maskFlag_Loc = t.getUniformLocation( - this.shaderProgram, - "u_maskFlag" - )), - (this.a_position_Loc_Off = t.getAttribLocation( - this.shaderProgramOff, - "a_position" - )), - (this.a_texCoord_Loc_Off = t.getAttribLocation( - this.shaderProgramOff, - "a_texCoord" - )), - (this.u_matrix_Loc_Off = t.getUniformLocation( - this.shaderProgramOff, - "u_mvpMatrix" - )), - (this.u_clipMatrix_Loc_Off = t.getUniformLocation( - this.shaderProgramOff, - "u_ClipMatrix" - )), - (this.s_texture0_Loc_Off = t.getUniformLocation( - this.shaderProgramOff, - "s_texture0" - )), - (this.s_texture1_Loc_Off = t.getUniformLocation( - this.shaderProgramOff, - "s_texture1" - )), - (this.u_channelFlag_Loc_Off = t.getUniformLocation( - this.shaderProgramOff, - "u_channelFlag" - )), - (this.u_baseColor_Loc_Off = t.getUniformLocation( - this.shaderProgramOff, - "u_baseColor" - )); - }), - (mt.prototype.disposeShader = function () { - var t = this.gl; - this.shaderProgram && - (t.deleteProgram(this.shaderProgram), - (this.shaderProgram = null)), - this.shaderProgramOff && - (t.deleteProgram(this.shaderProgramOff), - (this.shaderProgramOff = null)); - }), - (mt.prototype.compileShader = function (t, i) { - var e = this.gl, - r = i, - o = e.createShader(t); - if (null == o) return _._$Ji("_$L0 to create shader"), null; - if ( - (e.shaderSource(o, r), - e.compileShader(o), - !e.getShaderParameter(o, e.COMPILE_STATUS)) - ) { - var n = e.getShaderInfoLog(o); - return ( - _._$Ji("_$L0 to compile shader : " + n), e.deleteShader(o), null - ); - } - return o; - }), - (mt.prototype.loadShaders2 = function () { - var t = this.gl; - if (((this.shaderProgram = t.createProgram()), !this.shaderProgram)) - return !1; - if ( - ((this.shaderProgramOff = t.createProgram()), - !this.shaderProgramOff) - ) - return !1; - if ( - ((this.vertShader = this.compileShader( - t.VERTEX_SHADER, - "attribute vec4 a_position;attribute vec2 a_texCoord;varying vec2 v_texCoord;varying vec4 v_ClipPos;uniform mat4 u_mvpMatrix;void main(){ gl_Position = u_mvpMatrix * a_position; v_ClipPos = u_mvpMatrix * a_position; v_texCoord = a_texCoord;}" - )), - !this.vertShader) - ) - return _._$Ji("Vertex shader compile _$li!"), !1; - if ( - ((this.vertShaderOff = this.compileShader( - t.VERTEX_SHADER, - "attribute vec4 a_position;attribute vec2 a_texCoord;varying vec2 v_texCoord;varying vec4 v_ClipPos;uniform mat4 u_mvpMatrix;uniform mat4 u_ClipMatrix;void main(){ gl_Position = u_mvpMatrix * a_position; v_ClipPos = u_ClipMatrix * a_position; v_texCoord = a_texCoord ;}" - )), - !this.vertShaderOff) - ) - return _._$Ji("OffVertex shader compile _$li!"), !1; - if ( - ((this.fragShader = this.compileShader( - t.FRAGMENT_SHADER, - "precision mediump float;varying vec2 v_texCoord;varying vec4 v_ClipPos;uniform sampler2D s_texture0;uniform vec4 u_channelFlag;uniform vec4 u_baseColor;uniform bool u_maskFlag;void main(){ vec4 smpColor; if(u_maskFlag){ float isInside = step(u_baseColor.x, v_ClipPos.x/v_ClipPos.w) * step(u_baseColor.y, v_ClipPos.y/v_ClipPos.w) * step(v_ClipPos.x/v_ClipPos.w, u_baseColor.z) * step(v_ClipPos.y/v_ClipPos.w, u_baseColor.w); smpColor = u_channelFlag * texture2D(s_texture0 , v_texCoord).a * isInside; }else{ smpColor = texture2D(s_texture0 , v_texCoord) * u_baseColor; } gl_FragColor = smpColor;}" - )), - !this.fragShader) - ) - return _._$Ji("Fragment shader compile _$li!"), !1; - if ( - ((this.fragShaderOff = this.compileShader( - t.FRAGMENT_SHADER, - "precision mediump float ;varying vec2 v_texCoord;varying vec4 v_ClipPos;uniform sampler2D s_texture0;uniform sampler2D s_texture1;uniform vec4 u_channelFlag;uniform vec4 u_baseColor ;void main(){ vec4 col_formask = texture2D(s_texture0, v_texCoord) * u_baseColor; vec4 clipMask = texture2D(s_texture1, v_ClipPos.xy / v_ClipPos.w) * u_channelFlag; float maskVal = clipMask.r + clipMask.g + clipMask.b + clipMask.a; col_formask = col_formask * maskVal; gl_FragColor = col_formask;}" - )), - !this.fragShaderOff) - ) - return _._$Ji("OffFragment shader compile _$li!"), !1; - if ( - (t.attachShader(this.shaderProgram, this.vertShader), - t.attachShader(this.shaderProgram, this.fragShader), - t.attachShader(this.shaderProgramOff, this.vertShaderOff), - t.attachShader(this.shaderProgramOff, this.fragShaderOff), - t.linkProgram(this.shaderProgram), - t.linkProgram(this.shaderProgramOff), - !t.getProgramParameter(this.shaderProgram, t.LINK_STATUS)) - ) { - var i = t.getProgramInfoLog(this.shaderProgram); - return ( - _._$Ji("_$L0 to link program: " + i), - this.vertShader && - (t.deleteShader(this.vertShader), (this.vertShader = 0)), - this.fragShader && - (t.deleteShader(this.fragShader), (this.fragShader = 0)), - this.shaderProgram && - (t.deleteProgram(this.shaderProgram), - (this.shaderProgram = 0)), - this.vertShaderOff && - (t.deleteShader(this.vertShaderOff), - (this.vertShaderOff = 0)), - this.fragShaderOff && - (t.deleteShader(this.fragShaderOff), - (this.fragShaderOff = 0)), - this.shaderProgramOff && - (t.deleteProgram(this.shaderProgramOff), - (this.shaderProgramOff = 0)), - !1 - ); - } - return !0; - }), - (mt.prototype.createFramebuffer = function () { - var t = this.gl, - i = at.clippingMaskBufferSize, - e = t.createFramebuffer(); - t.bindFramebuffer(t.FRAMEBUFFER, e); - var r = t.createRenderbuffer(); - t.bindRenderbuffer(t.RENDERBUFFER, r), - t.renderbufferStorage(t.RENDERBUFFER, t.RGBA4, i, i), - t.framebufferRenderbuffer( - t.FRAMEBUFFER, - t.COLOR_ATTACHMENT0, - t.RENDERBUFFER, - r - ); - var o = t.createTexture(); - return ( - t.bindTexture(t.TEXTURE_2D, o), - t.texImage2D( - t.TEXTURE_2D, - 0, - t.RGBA, - i, - i, - 0, - t.RGBA, - t.UNSIGNED_BYTE, - null - ), - t.texParameteri(t.TEXTURE_2D, t.TEXTURE_MIN_FILTER, t.LINEAR), - t.texParameteri(t.TEXTURE_2D, t.TEXTURE_MAG_FILTER, t.LINEAR), - t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_S, t.CLAMP_TO_EDGE), - t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_T, t.CLAMP_TO_EDGE), - t.framebufferTexture2D( - t.FRAMEBUFFER, - t.COLOR_ATTACHMENT0, - t.TEXTURE_2D, - o, - 0 - ), - t.bindTexture(t.TEXTURE_2D, null), - t.bindRenderbuffer(t.RENDERBUFFER, null), - t.bindFramebuffer(t.FRAMEBUFFER, null), - (at.fTexture[this.glno] = o), - { - framebuffer: e, - renderbuffer: r, - texture: at.fTexture[this.glno], - } - ); - }), - (St.prototype._$fP = function () { - var t, - i, - e, - r = this._$ST(); - if (0 == (128 & r)) return 255 & r; - if (0 == (128 & (t = this._$ST()))) - return ((127 & r) << 7) | (127 & t); - if (0 == (128 & (i = this._$ST()))) - return ((127 & r) << 14) | ((127 & t) << 7) | (255 & i); - if (0 == (128 & (e = this._$ST()))) - return ( - ((127 & r) << 21) | - ((127 & t) << 14) | - ((127 & i) << 7) | - (255 & e) - ); - throw new lt("_$L _$0P _"); - }), - (St.prototype.getFormatVersion = function () { - return this._$S2; - }), - (St.prototype._$gr = function (t) { - this._$S2 = t; - }), - (St.prototype._$3L = function () { - return this._$fP(); - }), - (St.prototype._$mP = function () { - return ( - this._$zT(), (this._$F += 8), this._$T.getFloat64(this._$F - 8) - ); - }), - (St.prototype._$_T = function () { - return ( - this._$zT(), (this._$F += 4), this._$T.getFloat32(this._$F - 4) - ); - }), - (St.prototype._$6L = function () { - return ( - this._$zT(), (this._$F += 4), this._$T.getInt32(this._$F - 4) - ); - }), - (St.prototype._$ST = function () { - return this._$zT(), this._$T.getInt8(this._$F++); - }), - (St.prototype._$9T = function () { - return ( - this._$zT(), (this._$F += 2), this._$T.getInt16(this._$F - 2) - ); - }), - (St.prototype._$2T = function () { - throw (this._$zT(), (this._$F += 8), new lt("_$L _$q read long")); - }), - (St.prototype._$po = function () { - return this._$zT(), 0 != this._$T.getInt8(this._$F++); - }); - var xt = !0; - (St.prototype._$bT = function () { - this._$zT(); - var t = this._$3L(), - i = null; - if (xt) - try { - var e = new ArrayBuffer(2 * t); - i = new Uint16Array(e); - for (var r = 0; r < t; ++r) i[r] = this._$T.getUint8(this._$F++); - return String.fromCharCode.apply(null, i); - } catch (t) { - xt = !1; - } - try { - var o = new Array(); - if (null == i) - for (var r = 0; r < t; ++r) o[r] = this._$T.getUint8(this._$F++); - else for (var r = 0; r < t; ++r) o[r] = i[r]; - return String.fromCharCode.apply(null, o); - } catch (t) { - console.log("read utf8 / _$rT _$L0 !! : " + t); - } - }), - (St.prototype._$cS = function () { - this._$zT(); - for (var t = this._$3L(), i = new Int32Array(t), e = 0; e < t; e++) - (i[e] = this._$T.getInt32(this._$F)), (this._$F += 4); - return i; - }), - (St.prototype._$Tb = function () { - this._$zT(); - for ( - var t = this._$3L(), i = new Float32Array(t), e = 0; - e < t; - e++ - ) - (i[e] = this._$T.getFloat32(this._$F)), (this._$F += 4); - return i; - }), - (St.prototype._$5b = function () { - this._$zT(); - for ( - var t = this._$3L(), i = new Float64Array(t), e = 0; - e < t; - e++ - ) - (i[e] = this._$T.getFloat64(this._$F)), (this._$F += 8); - return i; - }), - (St.prototype._$nP = function () { - return this._$Jb(-1); - }), - (St.prototype._$Jb = function (t) { - if ((this._$zT(), t < 0 && (t = this._$3L()), t == G._$7P)) { - var i = this._$6L(); - if (0 <= i && i < this._$Ko.length) return this._$Ko[i]; - throw new lt("_$sL _$4i @_$m0"); - } - var e = this._$4b(t); - return this._$Ko.push(e), e; - }), - (St.prototype._$4b = function (t) { - if (0 == t) return null; - if (50 == t) { - var i = this._$bT(), - e = b.getID(i); - return e; - } - if (51 == t) { - var i = this._$bT(), - e = yt.getID(i); - return e; - } - if (134 == t) { - var i = this._$bT(), - e = l.getID(i); - return e; - } - if (60 == t) { - var i = this._$bT(), - e = u.getID(i); - return e; - } - if (t >= 48) { - var r = G._$9o(t); - return null != r ? (r._$F0(this), r) : null; - } - switch (t) { - case 1: - return this._$bT(); - case 10: - return new n(this._$6L(), !0); - case 11: - return new S( - this._$mP(), - this._$mP(), - this._$mP(), - this._$mP() - ); - case 12: - return new S( - this._$_T(), - this._$_T(), - this._$_T(), - this._$_T() - ); - case 13: - return new L(this._$mP(), this._$mP()); - case 14: - return new L(this._$_T(), this._$_T()); - case 15: - for (var o = this._$3L(), e = new Array(o), s = 0; s < o; s++) - e[s] = this._$nP(); - return e; - case 17: - var e = new F( - this._$mP(), - this._$mP(), - this._$mP(), - this._$mP(), - this._$mP(), - this._$mP() - ); - return e; - case 21: - return new h( - this._$6L(), - this._$6L(), - this._$6L(), - this._$6L() - ); - case 22: - return new pt(this._$6L(), this._$6L()); - case 23: - throw new Error("_$L _$ro "); - case 16: - case 25: - return this._$cS(); - case 26: - return this._$5b(); - case 27: - return this._$Tb(); - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 18: - case 19: - case 20: - case 24: - case 28: - throw new lt("_$6 _$q : _$nP() of 2-9 ,18,19,20,24,28 : " + t); - default: - throw new lt("_$6 _$q : _$nP() NO _$i : " + t); - } - }), - (St.prototype._$8L = function () { - return ( - 0 == this._$hL - ? (this._$v0 = this._$ST()) - : 8 == this._$hL && - ((this._$v0 = this._$ST()), (this._$hL = 0)), - 1 == ((this._$v0 >> (7 - this._$hL++)) & 1) - ); - }), - (St.prototype._$zT = function () { - 0 != this._$hL && (this._$hL = 0); - }), - (vt.prototype._$wP = function (t, i, e) { - for (var r = 0; r < e; r++) { - for (var o = 0; o < i; o++) { - var n = 2 * (o + r * i); - console.log("(% 7.3f , % 7.3f) , ", t[n], t[n + 1]); - } - console.log("\n"); - } - console.log("\n"); - }), - (Lt._$2S = Math.PI / 180), - (Lt._$bS = Math.PI / 180), - (Lt._$wS = 180 / Math.PI), - (Lt._$NS = 180 / Math.PI), - (Lt.PI_F = Math.PI), - (Lt._$kT = [ - 0, 0.012368, 0.024734, 0.037097, 0.049454, 0.061803, 0.074143, - 0.086471, 0.098786, 0.111087, 0.12337, 0.135634, 0.147877, 0.160098, - 0.172295, 0.184465, 0.196606, 0.208718, 0.220798, 0.232844, - 0.244854, 0.256827, 0.268761, 0.280654, 0.292503, 0.304308, - 0.316066, 0.327776, 0.339436, 0.351044, 0.362598, 0.374097, - 0.385538, 0.396921, 0.408243, 0.419502, 0.430697, 0.441826, - 0.452888, 0.463881, 0.474802, 0.485651, 0.496425, 0.507124, - 0.517745, 0.528287, 0.538748, 0.549126, 0.559421, 0.56963, 0.579752, - 0.589785, 0.599728, 0.609579, 0.619337, 0.629, 0.638567, 0.648036, - 0.657406, 0.666676, 0.675843, 0.684908, 0.693867, 0.70272, 0.711466, - 0.720103, 0.72863, 0.737045, 0.745348, 0.753536, 0.76161, 0.769566, - 0.777405, 0.785125, 0.792725, 0.800204, 0.807561, 0.814793, - 0.821901, 0.828884, 0.835739, 0.842467, 0.849066, 0.855535, - 0.861873, 0.868079, 0.874153, 0.880093, 0.885898, 0.891567, - 0.897101, 0.902497, 0.907754, 0.912873, 0.917853, 0.922692, 0.92739, - 0.931946, 0.936359, 0.940629, 0.944755, 0.948737, 0.952574, - 0.956265, 0.959809, 0.963207, 0.966457, 0.96956, 0.972514, 0.97532, - 0.977976, 0.980482, 0.982839, 0.985045, 0.987101, 0.989006, - 0.990759, 0.992361, 0.993811, 0.995109, 0.996254, 0.997248, - 0.998088, 0.998776, 0.999312, 0.999694, 0.999924, 1, - ]), - (Lt._$92 = function (t, i) { - var e = Math.atan2(t[1], t[0]), - r = Math.atan2(i[1], i[0]); - return Lt._$tS(e, r); - }), - (Lt._$tS = function (t, i) { - for (var e = t - i; e < -Math.PI; ) e += 2 * Math.PI; - for (; e > Math.PI; ) e -= 2 * Math.PI; - return e; - }), - (Lt._$9 = function (t) { - return Math.sin(t); - }), - (Lt.fcos = function (t) { - return Math.cos(t); - }), - (Mt.prototype._$u2 = function () { - return this._$IS[0]; - }), - (Mt.prototype._$yo = function () { - return this._$AT && !this._$IS[0]; - }), - (Mt.prototype._$GT = function () { - return this._$e0; - }), - (Et._$W2 = 0), - (Et.SYSTEM_INFO = null), - (Et.USER_AGENT = navigator.userAgent), - (Et.isIPhone = function () { - return Et.SYSTEM_INFO || Et.setup(), Et.SYSTEM_INFO._isIPhone; - }), - (Et.isIOS = function () { - return ( - Et.SYSTEM_INFO || Et.setup(), - Et.SYSTEM_INFO._isIPhone || Et.SYSTEM_INFO._isIPad - ); - }), - (Et.isAndroid = function () { - return Et.SYSTEM_INFO || Et.setup(), Et.SYSTEM_INFO._isAndroid; - }), - (Et.getOSVersion = function () { - return Et.SYSTEM_INFO || Et.setup(), Et.SYSTEM_INFO.version; - }), - (Et.getOS = function () { - return ( - Et.SYSTEM_INFO || Et.setup(), - Et.SYSTEM_INFO._isIPhone || Et.SYSTEM_INFO._isIPad - ? "iOS" - : Et.SYSTEM_INFO._isAndroid - ? "Android" - : "_$Q0 OS" - ); - }), - (Et.setup = function () { - function t(t, i) { - for ( - var e = t.substring(i).split(/[ _,;\.]/), r = 0, o = 0; - o <= 2 && !isNaN(e[o]); - o++ - ) { - var n = parseInt(e[o]); - if (n < 0 || n > 999) { - _._$li("err : " + n + " @UtHtml5.setup()"), (r = 0); - break; - } - r += n * Math.pow(1e3, 2 - o); - } - return r; - } - var i, - e = Et.USER_AGENT, - r = (Et.SYSTEM_INFO = { userAgent: e }); - if ((i = e.indexOf("iPhone OS ")) >= 0) - (r.os = "iPhone"), - (r._isIPhone = !0), - (r.version = t(e, i + "iPhone OS ".length)); - else if ((i = e.indexOf("iPad")) >= 0) { - if ((i = e.indexOf("CPU OS")) < 0) - return void _._$li(" err : " + e + " @UtHtml5.setup()"); - (r.os = "iPad"), - (r._isIPad = !0), - (r.version = t(e, i + "CPU OS ".length)); - } else - (i = e.indexOf("Android")) >= 0 - ? ((r.os = "Android"), - (r._isAndroid = !0), - (r.version = t(e, i + "Android ".length))) - : ((r.os = "-"), (r.version = -1)); - }), - (window.UtSystem = w), - (window.UtDebug = _), - (window.LDTransform = gt), - (window.LDGL = nt), - (window.Live2D = at), - (window.Live2DModelWebGL = ft), - (window.Live2DModelJS = q), - (window.Live2DMotion = J), - (window.MotionQueueManager = ct), - (window.PhysicsHair = f), - (window.AMotion = s), - (window.PartsDataID = l), - (window.DrawDataID = b), - (window.BaseDataID = yt), - (window.ParamID = u), - at.init(); - var At = !1; - })(); - }).call(i, e(7)); - }, - function (t, i) { - t.exports = { - import: function () { - throw new Error("System.import cannot be used indirectly"); - }, - }; - }, - function (t, i, e) { - "use strict"; - function r(t) { - return t && t.__esModule ? t : { default: t }; - } - function o() { - (this.models = []), - (this.count = -1), - (this.reloadFlg = !1), - Live2D.init(), - n.Live2DFramework.setPlatformManager(new _.default()); - } - Object.defineProperty(i, "__esModule", { value: !0 }), (i.default = o); - var n = e(0), - s = e(9), - _ = r(s), - a = e(10), - h = r(a), - l = e(1), - $ = r(l); - (o.prototype.createModel = function () { - var t = new h.default(); - return this.models.push(t), t; - }), - (o.prototype.changeModel = function (t, i) { - if (this.reloadFlg) { - this.reloadFlg = !1; - this.releaseModel(0, t), - this.createModel(), - this.models[0].load(t, i); - } - }), - (o.prototype.getModel = function (t) { - return t >= this.models.length ? null : this.models[t]; - }), - (o.prototype.releaseModel = function (t, i) { - this.models.length <= t || - (this.models[t].release(i), - delete this.models[t], - this.models.splice(t, 1)); - }), - (o.prototype.numModels = function () { - return this.models.length; - }), - (o.prototype.setDrag = function (t, i) { - for (var e = 0; e < this.models.length; e++) - this.models[e].setDrag(t, i); - }), - (o.prototype.maxScaleEvent = function () { - $.default.DEBUG_LOG && console.log("Max scale event."); - for (var t = 0; t < this.models.length; t++) - this.models[t].startRandomMotion( - $.default.MOTION_GROUP_PINCH_IN, - $.default.PRIORITY_NORMAL - ); - }), - (o.prototype.minScaleEvent = function () { - $.default.DEBUG_LOG && console.log("Min scale event."); - for (var t = 0; t < this.models.length; t++) - this.models[t].startRandomMotion( - $.default.MOTION_GROUP_PINCH_OUT, - $.default.PRIORITY_NORMAL - ); - }), - (o.prototype.tapEvent = function (t, i) { - $.default.DEBUG_LOG && console.log("tapEvent view x:" + t + " y:" + i); - for (var e = 0; e < this.models.length; e++) - this.models[e].hitTest($.default.HIT_AREA_HEAD, t, i) - ? ($.default.DEBUG_LOG && console.log("Tap face."), - this.models[e].setRandomExpression()) - : this.models[e].hitTest($.default.HIT_AREA_BODY, t, i) - ? ($.default.DEBUG_LOG && - console.log("Tap body. models[" + e + "]"), - this.models[e].startRandomMotion( - $.default.MOTION_GROUP_TAP_BODY, - $.default.PRIORITY_NORMAL - )) - : this.models[e].hitTestCustom("head", t, i) - ? ($.default.DEBUG_LOG && console.log("Tap face."), - this.models[e].startRandomMotion( - $.default.MOTION_GROUP_FLICK_HEAD, - $.default.PRIORITY_NORMAL - )) - : this.models[e].hitTestCustom("body", t, i) && - ($.default.DEBUG_LOG && - console.log("Tap body. models[" + e + "]"), - this.models[e].startRandomMotion( - $.default.MOTION_GROUP_TAP_BODY, - $.default.PRIORITY_NORMAL - )); - return !0; - }); - }, - function (t, i, e) { - "use strict"; - function r() {} - Object.defineProperty(i, "__esModule", { value: !0 }), (i.default = r); - var o = e(2); - var requestCache = {}; - (r.prototype.loadBytes = function (t, i) { - if (requestCache[t] !== undefined) { - i(requestCache[t]); - return; - } - var e = new XMLHttpRequest(); - e.open("GET", t, !0), - (e.responseType = "arraybuffer"), - (e.onload = function () { - switch (e.status) { - case 200: - requestCache[t] = e.response; - i(e.response); - break; - default: - console.error("Failed to load (" + e.status + ") : " + t); - } - }), - e.send(null); - }), - (r.prototype.loadString = function (t) { - this.loadBytes(t, function (t) { - return t; - }); - }), - (r.prototype.loadLive2DModel = function (t, i) { - var e = null; - this.loadBytes(t, function (t) { - (e = Live2DModelWebGL.loadModel(t)), i(e); - }); - }), - (r.prototype.loadTexture = function (t, i, e, r) { - var n = new Image(); - (n.crossOrigin = "Anonymous"), (n.src = e); - (n.onload = function () { - var e = (0, o.getContext)(), - s = e.createTexture(); - if (!s) - return console.error("Failed to generate gl texture name."), -1; - 0 == t.isPremultipliedAlpha() && - e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL, 1), - e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL, 1), - e.activeTexture(e.TEXTURE0), - e.bindTexture(e.TEXTURE_2D, s), - e.texImage2D(e.TEXTURE_2D, 0, e.RGBA, e.RGBA, e.UNSIGNED_BYTE, n), - e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MAG_FILTER, e.LINEAR), - e.texParameteri( - e.TEXTURE_2D, - e.TEXTURE_MIN_FILTER, - e.LINEAR_MIPMAP_NEAREST - ), - e.generateMipmap(e.TEXTURE_2D), - t.setTexture(i, s), - (s = null), - "function" == typeof r && r(); - }), - (n.onerror = function () { - console.error("Failed to load image : " + e); - }); - }), - (r.prototype.jsonParseFromBytes = function (t) { - var i, - e = new Uint8Array(t, 0, 3); - return ( - (i = - 239 == e[0] && 187 == e[1] && 191 == e[2] - ? String.fromCharCode.apply(null, new Uint8Array(t, 3)) - : String.fromCharCode.apply(null, new Uint8Array(t))), - JSON.parse(i) - ); - }), - (r.prototype.log = function (t) {}); - }, - function (t, i, e) { - "use strict"; - function r(t) { - return t && t.__esModule ? t : { default: t }; - } - function o() { - n.L2DBaseModel.prototype.constructor.call(this), - (this.modelHomeDir = ""), - (this.modelSetting = null), - (this.tmpMatrix = []); - } - Object.defineProperty(i, "__esModule", { value: !0 }), (i.default = o); - var n = e(0), - s = e(11), - _ = r(s), - a = e(1), - h = r(a), - l = e(3), - $ = r(l); - (o.prototype = new n.L2DBaseModel()), - (o.prototype.load = function (t, i, e) { - this.setUpdating(!0), - this.setInitialized(!1), - (this.modelHomeDir = i.substring(0, i.lastIndexOf("/") + 1)), - (this.modelSetting = new _.default()); - var r = this; - this.modelSetting.loadModelSetting(i, function () { - var t = r.modelHomeDir + r.modelSetting.getModelFile(); - r.loadModelData(t, function (t) { - for (var i = 0; i < r.modelSetting.getTextureNum(); i++) { - if (/^https?:\/\/|^\/\//i.test(r.modelSetting.getTextureFile(i))) - var o = r.modelSetting.getTextureFile(i); - else var o = r.modelHomeDir + r.modelSetting.getTextureFile(i); - r.loadTexture(i, o, function () { - if (r.isTexLoaded) { - if (r.modelSetting.getExpressionNum() > 0) { - r.expressions = {}; - for ( - var t = 0; - t < r.modelSetting.getExpressionNum(); - t++ - ) { - var i = r.modelSetting.getExpressionName(t), - o = - r.modelHomeDir + r.modelSetting.getExpressionFile(t); - r.loadExpression(i, o); - } - } else (r.expressionManager = null), (r.expressions = {}); - if ( - (r.eyeBlink, - null != r.modelSetting.getPhysicsFile() - ? r.loadPhysics( - r.modelHomeDir + r.modelSetting.getPhysicsFile() - ) - : (r.physics = null), - null != r.modelSetting.getPoseFile() - ? r.loadPose( - r.modelHomeDir + r.modelSetting.getPoseFile(), - function () { - r.pose.updateParam(r.live2DModel); - } - ) - : (r.pose = null), - null != r.modelSetting.getLayout()) - ) { - var n = r.modelSetting.getLayout(); - null != n.width && r.modelMatrix.setWidth(n.width), - null != n.height && r.modelMatrix.setHeight(n.height), - null != n.x && r.modelMatrix.setX(n.x), - null != n.y && r.modelMatrix.setY(n.y), - null != n.center_x && r.modelMatrix.centerX(n.center_x), - null != n.center_y && r.modelMatrix.centerY(n.center_y), - null != n.top && r.modelMatrix.top(n.top), - null != n.bottom && r.modelMatrix.bottom(n.bottom), - null != n.left && r.modelMatrix.left(n.left), - null != n.right && r.modelMatrix.right(n.right); - } - if (null != r.modelSetting.getHitAreasCustom()) { - var s = r.modelSetting.getHitAreasCustom(); - null != s.head_x && - (h.default.hit_areas_custom_head_x = s.head_x), - null != s.head_y && - (h.default.hit_areas_custom_head_y = s.head_y), - null != s.body_x && - (h.default.hit_areas_custom_body_x = s.body_x), - null != s.body_y && - (h.default.hit_areas_custom_body_y = s.body_y); - } - for (var t = 0; t < r.modelSetting.getInitParamNum(); t++) - r.live2DModel.setParamFloat( - r.modelSetting.getInitParamID(t), - r.modelSetting.getInitParamValue(t) - ); - for ( - var t = 0; - t < r.modelSetting.getInitPartsVisibleNum(); - t++ - ) - r.live2DModel.setPartsOpacity( - r.modelSetting.getInitPartsVisibleID(t), - r.modelSetting.getInitPartsVisibleValue(t) - ); - r.live2DModel.saveParam(), - r.preloadMotionGroup(h.default.MOTION_GROUP_IDLE), - r.preloadMotionGroup(h.default.MOTION_GROUP_SLEEPY), - r.mainMotionManager.stopAllMotions(), - r.setUpdating(!1), - r.setInitialized(!0), - "function" == typeof e && e(); - } - }); - } - }); - }); - }), - (o.prototype.release = function (t) { - var i = n.Live2DFramework.getPlatformManager(); - t.deleteTexture(i.texture); - }), - (o.prototype.preloadMotionGroup = function (t) { - for (var i = this, e = 0; e < this.modelSetting.getMotionNum(t); e++) { - var r = this.modelSetting.getMotionFile(t, e); - this.loadMotion(r, this.modelHomeDir + r, function (r) { - r.setFadeIn(i.modelSetting.getMotionFadeIn(t, e)), - r.setFadeOut(i.modelSetting.getMotionFadeOut(t, e)); - }); - } - }), - (o.prototype.update = function () { - if (null == this.live2DModel) - return void ( - h.default.DEBUG_LOG && console.error("Failed to update.") - ); - var t = UtSystem.getUserTimeMSec() - this.startTimeMSec, - i = t / 1e3, - e = 2 * i * Math.PI; - if (this.mainMotionManager.isFinished()) { - "1" === sessionStorage.getItem("Sleepy") - ? this.startRandomMotion( - h.default.MOTION_GROUP_SLEEPY, - h.default.PRIORITY_SLEEPY - ) - : this.startRandomMotion( - h.default.MOTION_GROUP_IDLE, - h.default.PRIORITY_IDLE - ); - } - this.live2DModel.loadParam(), - this.mainMotionManager.updateParam(this.live2DModel) || - (null != this.eyeBlink && - this.eyeBlink.updateParam(this.live2DModel)), - this.live2DModel.saveParam(), - null == this.expressionManager || - null == this.expressions || - this.expressionManager.isFinished() || - this.expressionManager.updateParam(this.live2DModel), - this.live2DModel.addToParamFloat("PARAM_ANGLE_X", 30 * this.dragX, 1), - this.live2DModel.addToParamFloat("PARAM_ANGLE_Y", 30 * this.dragY, 1), - this.live2DModel.addToParamFloat( - "PARAM_ANGLE_Z", - this.dragX * this.dragY * -30, - 1 - ), - this.live2DModel.addToParamFloat( - "PARAM_BODY_ANGLE_X", - 10 * this.dragX, - 1 - ), - this.live2DModel.addToParamFloat("PARAM_EYE_BALL_X", this.dragX, 1), - this.live2DModel.addToParamFloat("PARAM_EYE_BALL_Y", this.dragY, 1), - this.live2DModel.addToParamFloat( - "PARAM_ANGLE_X", - Number(15 * Math.sin(e / 6.5345)), - 0.5 - ), - this.live2DModel.addToParamFloat( - "PARAM_ANGLE_Y", - Number(8 * Math.sin(e / 3.5345)), - 0.5 - ), - this.live2DModel.addToParamFloat( - "PARAM_ANGLE_Z", - Number(10 * Math.sin(e / 5.5345)), - 0.5 - ), - this.live2DModel.addToParamFloat( - "PARAM_BODY_ANGLE_X", - Number(4 * Math.sin(e / 15.5345)), - 0.5 - ), - this.live2DModel.setParamFloat( - "PARAM_BREATH", - Number(0.5 + 0.5 * Math.sin(e / 3.2345)), - 1 - ), - null != this.physics && this.physics.updateParam(this.live2DModel), - null == this.lipSync && - this.live2DModel.setParamFloat( - "PARAM_MOUTH_OPEN_Y", - this.lipSyncValue - ), - null != this.pose && this.pose.updateParam(this.live2DModel), - this.live2DModel.update(); - }), - (o.prototype.setRandomExpression = function () { - var t = []; - for (var i in this.expressions) t.push(i); - var e = parseInt(Math.random() * t.length); - this.setExpression(t[e]); - }), - (o.prototype.startRandomMotion = function (t, i) { - var e = this.modelSetting.getMotionNum(t), - r = parseInt(Math.random() * e); - this.startMotion(t, r, i); - }), - (o.prototype.startMotion = function (t, i, e) { - var r = this.modelSetting.getMotionFile(t, i); - if (null == r || "" == r) - return void ( - h.default.DEBUG_LOG && console.error("Failed to motion.") - ); - if (e == h.default.PRIORITY_FORCE) - this.mainMotionManager.setReservePriority(e); - else if (!this.mainMotionManager.reserveMotion(e)) - return void ( - h.default.DEBUG_LOG && console.log("Motion is running.") - ); - var o, - n = this; - null == this.motions[t] - ? this.loadMotion(null, this.modelHomeDir + r, function (r) { - (o = r), n.setFadeInFadeOut(t, i, e, o); - }) - : ((o = this.motions[t]), n.setFadeInFadeOut(t, i, e, o)); - }), - (o.prototype.setFadeInFadeOut = function (t, i, e, r) { - var o = this.modelSetting.getMotionFile(t, i); - if ( - (r.setFadeIn(this.modelSetting.getMotionFadeIn(t, i)), - r.setFadeOut(this.modelSetting.getMotionFadeOut(t, i)), - h.default.DEBUG_LOG && console.log("Start motion : " + o), - null == this.modelSetting.getMotionSound(t, i)) - ) - this.mainMotionManager.startMotionPrio(r, e); - else { - var n = this.modelSetting.getMotionSound(t, i), - s = document.createElement("audio"); - (s.src = this.modelHomeDir + n), - h.default.DEBUG_LOG && console.log("Start sound : " + n), - s.play(), - this.mainMotionManager.startMotionPrio(r, e); - } - }), - (o.prototype.setExpression = function (t) { - var i = this.expressions[t]; - h.default.DEBUG_LOG && console.log("Expression : " + t), - this.expressionManager.startMotion(i, !1); - }), - (o.prototype.draw = function (t) { - $.default.push(), - $.default.multMatrix(this.modelMatrix.getArray()), - (this.tmpMatrix = $.default.getMatrix()), - this.live2DModel.setMatrix(this.tmpMatrix), - this.live2DModel.draw(), - $.default.pop(); - }), - (o.prototype.hitTest = function (t, i, e) { - for (var r = this.modelSetting.getHitAreaNum(), o = 0; o < r; o++) - if (t == this.modelSetting.getHitAreaName(o)) { - var n = this.modelSetting.getHitAreaID(o); - return this.hitTestSimple(n, i, e); - } - return !1; - }), - (o.prototype.hitTestCustom = function (t, i, e) { - return "head" == t - ? this.hitTestSimpleCustom( - h.default.hit_areas_custom_head_x, - h.default.hit_areas_custom_head_y, - i, - e - ) - : "body" == t && - this.hitTestSimpleCustom( - h.default.hit_areas_custom_body_x, - h.default.hit_areas_custom_body_y, - i, - e - ); - }); - }, - function (t, i, e) { - "use strict"; - function r() { - (this.NAME = "name"), - (this.ID = "id"), - (this.MODEL = "model"), - (this.TEXTURES = "textures"), - (this.HIT_AREAS = "hit_areas"), - (this.PHYSICS = "physics"), - (this.POSE = "pose"), - (this.EXPRESSIONS = "expressions"), - (this.MOTION_GROUPS = "motions"), - (this.SOUND = "sound"), - (this.FADE_IN = "fade_in"), - (this.FADE_OUT = "fade_out"), - (this.LAYOUT = "layout"), - (this.HIT_AREAS_CUSTOM = "hit_areas_custom"), - (this.INIT_PARAM = "init_param"), - (this.INIT_PARTS_VISIBLE = "init_parts_visible"), - (this.VALUE = "val"), - (this.FILE = "file"), - (this.json = {}); - } - Object.defineProperty(i, "__esModule", { value: !0 }), (i.default = r); - var o = e(0); - (r.prototype.loadModelSetting = function (t, i) { - var e = this; - o.Live2DFramework.getPlatformManager().loadBytes(t, function (t) { - var r = String.fromCharCode.apply(null, new Uint8Array(t)); - (e.json = JSON.parse(r)), i(); - }); - }), - (r.prototype.getTextureFile = function (t) { - return null == this.json[this.TEXTURES] || - null == this.json[this.TEXTURES][t] - ? null - : this.json[this.TEXTURES][t]; - }), - (r.prototype.getModelFile = function () { - return this.json[this.MODEL]; - }), - (r.prototype.getTextureNum = function () { - return null == this.json[this.TEXTURES] - ? 0 - : this.json[this.TEXTURES].length; - }), - (r.prototype.getHitAreaNum = function () { - return null == this.json[this.HIT_AREAS] - ? 0 - : this.json[this.HIT_AREAS].length; - }), - (r.prototype.getHitAreaID = function (t) { - return null == this.json[this.HIT_AREAS] || - null == this.json[this.HIT_AREAS][t] - ? null - : this.json[this.HIT_AREAS][t][this.ID]; - }), - (r.prototype.getHitAreaName = function (t) { - return null == this.json[this.HIT_AREAS] || - null == this.json[this.HIT_AREAS][t] - ? null - : this.json[this.HIT_AREAS][t][this.NAME]; - }), - (r.prototype.getPhysicsFile = function () { - return this.json[this.PHYSICS]; - }), - (r.prototype.getPoseFile = function () { - return this.json[this.POSE]; - }), - (r.prototype.getExpressionNum = function () { - return null == this.json[this.EXPRESSIONS] - ? 0 - : this.json[this.EXPRESSIONS].length; - }), - (r.prototype.getExpressionFile = function (t) { - return null == this.json[this.EXPRESSIONS] - ? null - : this.json[this.EXPRESSIONS][t][this.FILE]; - }), - (r.prototype.getExpressionName = function (t) { - return null == this.json[this.EXPRESSIONS] - ? null - : this.json[this.EXPRESSIONS][t][this.NAME]; - }), - (r.prototype.getLayout = function () { - return this.json[this.LAYOUT]; - }), - (r.prototype.getHitAreasCustom = function () { - return this.json[this.HIT_AREAS_CUSTOM]; - }), - (r.prototype.getInitParamNum = function () { - return null == this.json[this.INIT_PARAM] - ? 0 - : this.json[this.INIT_PARAM].length; - }), - (r.prototype.getMotionNum = function (t) { - return null == this.json[this.MOTION_GROUPS] || - null == this.json[this.MOTION_GROUPS][t] - ? 0 - : this.json[this.MOTION_GROUPS][t].length; - }), - (r.prototype.getMotionFile = function (t, i) { - return null == this.json[this.MOTION_GROUPS] || - null == this.json[this.MOTION_GROUPS][t] || - null == this.json[this.MOTION_GROUPS][t][i] - ? null - : this.json[this.MOTION_GROUPS][t][i][this.FILE]; - }), - (r.prototype.getMotionSound = function (t, i) { - return null == this.json[this.MOTION_GROUPS] || - null == this.json[this.MOTION_GROUPS][t] || - null == this.json[this.MOTION_GROUPS][t][i] || - null == this.json[this.MOTION_GROUPS][t][i][this.SOUND] - ? null - : this.json[this.MOTION_GROUPS][t][i][this.SOUND]; - }), - (r.prototype.getMotionFadeIn = function (t, i) { - return null == this.json[this.MOTION_GROUPS] || - null == this.json[this.MOTION_GROUPS][t] || - null == this.json[this.MOTION_GROUPS][t][i] || - null == this.json[this.MOTION_GROUPS][t][i][this.FADE_IN] - ? 1e3 - : this.json[this.MOTION_GROUPS][t][i][this.FADE_IN]; - }), - (r.prototype.getMotionFadeOut = function (t, i) { - return null == this.json[this.MOTION_GROUPS] || - null == this.json[this.MOTION_GROUPS][t] || - null == this.json[this.MOTION_GROUPS][t][i] || - null == this.json[this.MOTION_GROUPS][t][i][this.FADE_OUT] - ? 1e3 - : this.json[this.MOTION_GROUPS][t][i][this.FADE_OUT]; - }), - (r.prototype.getInitParamID = function (t) { - return null == this.json[this.INIT_PARAM] || - null == this.json[this.INIT_PARAM][t] - ? null - : this.json[this.INIT_PARAM][t][this.ID]; - }), - (r.prototype.getInitParamValue = function (t) { - return null == this.json[this.INIT_PARAM] || - null == this.json[this.INIT_PARAM][t] - ? NaN - : this.json[this.INIT_PARAM][t][this.VALUE]; - }), - (r.prototype.getInitPartsVisibleNum = function () { - return null == this.json[this.INIT_PARTS_VISIBLE] - ? 0 - : this.json[this.INIT_PARTS_VISIBLE].length; - }), - (r.prototype.getInitPartsVisibleID = function (t) { - return null == this.json[this.INIT_PARTS_VISIBLE] || - null == this.json[this.INIT_PARTS_VISIBLE][t] - ? null - : this.json[this.INIT_PARTS_VISIBLE][t][this.ID]; - }), - (r.prototype.getInitPartsVisibleValue = function (t) { - return null == this.json[this.INIT_PARTS_VISIBLE] || - null == this.json[this.INIT_PARTS_VISIBLE][t] - ? NaN - : this.json[this.INIT_PARTS_VISIBLE][t][this.VALUE]; - }); - }, -]); +(function(){var j=true;function aa(){if(j){return;}this._$MT=null;this._$5S=null;this._$NP=0;aa._$42++;this._$5S=new y(this);}aa._$0s=1;aa._$4s=2;aa._$42=0;aa._$62=function(aQ,aU){try{if(aU instanceof ArrayBuffer){aU=new DataView(aU);}if(!(aU instanceof DataView)){throw new J("_$SS#loadModel(b) / b _$x be DataView or ArrayBuffer");}var aS=new K(aU);var aM=aS._$ST();var aK=aS._$ST();var aJ=aS._$ST();var aN;if(aM==109&&aK==111&&aJ==99){aN=aS._$ST();}else{throw new J("_$gi _$C _$li , _$Q0 _$P0.");}aS._$gr(aN);if(aN>ay._$T7){aQ._$NP|=aa._$4s;var aR=ay._$T7;var aI="_$gi _$C _$li , _$n0 _$_ version _$li ( SDK : "+aR+" < _$f0 : "+aN+" )@_$SS#loadModel()\n";throw new J(aI);}var aL=aS._$nP();if(aN>=ay._$s7){var aH=aS._$9T();var aT=aS._$9T();if(aH!=-30584||aT!=-30584){aQ._$NP|=aa._$0s;throw new J("_$gi _$C _$li , _$0 _$6 _$Ui.");}}aQ._$KS(aL);var aP=aQ.getModelContext();aP.setDrawParam(aQ.getDrawParam());aP.init();}catch(aO){q._$Rb(aO);}};aa.prototype._$KS=function(aH){this._$MT=aH;};aa.prototype.getModelImpl=function(){if(this._$MT==null){this._$MT=new w();this._$MT._$zP();}return this._$MT;};aa.prototype.getCanvasWidth=function(){if(this._$MT==null){return 0;}return this._$MT.getCanvasWidth();};aa.prototype.getCanvasHeight=function(){if(this._$MT==null){return 0;}return this._$MT.getCanvasHeight();};aa.prototype.getParamFloat=function(aH){if(typeof aH!="number"){aH=this._$5S.getParamIndex(z.getID(aH));}return this._$5S.getParamFloat(aH);};aa.prototype.setParamFloat=function(aH,aJ,aI){if(typeof aH!="number"){aH=this._$5S.getParamIndex(z.getID(aH));}if(arguments.length<3){aI=1;}this._$5S.setParamFloat(aH,this._$5S.getParamFloat(aH)*(1-aI)+aJ*aI);};aa.prototype.addToParamFloat=function(aH,aJ,aI){if(typeof aH!="number"){aH=this._$5S.getParamIndex(z.getID(aH));}if(arguments.length<3){aI=1;}this._$5S.setParamFloat(aH,this._$5S.getParamFloat(aH)+aJ*aI);};aa.prototype.multParamFloat=function(aH,aJ,aI){if(typeof aH!="number"){aH=this._$5S.getParamIndex(z.getID(aH));}if(arguments.length<3){aI=1;}this._$5S.setParamFloat(aH,this._$5S.getParamFloat(aH)*(1+(aJ-1)*aI));};aa.prototype.getParamIndex=function(aH){return this._$5S.getParamIndex(z.getID(aH));};aa.prototype.loadParam=function(){this._$5S.loadParam();};aa.prototype.saveParam=function(){this._$5S.saveParam();};aa.prototype.init=function(){this._$5S.init();};aa.prototype.update=function(){this._$5S.update();};aa.prototype._$Rs=function(){q._$li("_$60 _$PT _$Rs()");return -1;};aa.prototype._$Ds=function(aH){q._$li("_$60 _$PT _$SS#_$Ds() \n");};aa.prototype._$K2=function(){};aa.prototype.draw=function(){};aa.prototype.getModelContext=function(){return this._$5S;};aa.prototype._$s2=function(){return this._$NP;};aa.prototype._$P7=function(aK,aR,aH,a0){var aU=-1;var aY=0;var aM=this;var aJ=0.5;var aI=0.15;var aX=true;if(aH==0){for(var aV=0;aV1){aQ=1;}}else{aQ-=aW;if(aQ<0){aQ=0;}}aM.setPartsOpacity(aO,aQ);}else{for(var aV=0;aV=0){break;}aU=aV;var aO=aR[aV];aY=aM.getPartsOpacity(aO);aY+=aH/a0;if(aY>1){aY=1;}}}if(aU<0){console.log("No _$wi _$q0/ _$U default[%s]",aK[0]);aU=0;aY=1;aM.loadParam();aM.setParamFloat(aK[aU],aY);aM.saveParam();}for(var aV=0;aVaI){aZ=1-aI/(1-aY);}}if(aL>aZ){aL=aZ;}aM.setPartsOpacity(aO,aL);}}}}};aa.prototype.setPartsOpacity=function(aI,aH){if(typeof aI!="number"){aI=this._$5S.getPartsDataIndex(i.getID(aI));}this._$5S.setPartsOpacity(aI,aH);};aa.prototype.getPartsDataIndex=function(aH){if(!(aH instanceof i)){aH=i.getID(aH);}return this._$5S.getPartsDataIndex(aH);};aa.prototype.getPartsOpacity=function(aH){if(typeof aH!="number"){aH=this._$5S.getPartsDataIndex(i.getID(aH));}if(aH<0){return 0;}return this._$5S.getPartsOpacity(aH);};aa.prototype.getDrawParam=function(){};aa.prototype.getDrawDataIndex=function(aH){return this._$5S.getDrawDataIndex(Z.getID(aH));};aa.prototype.getDrawData=function(aH){return this._$5S.getDrawData(aH);};aa.prototype.getTransformedPoints=function(aH){var aI=this._$5S._$C2(aH);if(aI instanceof ag){return(aI).getTransformedPoints();}return null;};aa.prototype.getIndexArray=function(aI){if(aI<0||aI>=this._$5S._$aS.length){return null;}var aH=this._$5S._$aS[aI];if(aH!=null&&aH.getType()==a._$wb){if(aH instanceof b){return aH.getIndexArray();}}return null;};function W(aJ){if(j){return;}this.clipContextList=new Array();this.glcontext=aJ.gl;this.dp_webgl=aJ;this.curFrameNo=0;this.firstError_clipInNotUpdate=true;this.colorBuffer=0;this.isInitGLFBFunc=false;this.tmpBoundsOnModel=new av();if(Q.glContext.length>Q.frameBuffers.length){this.curFrameNo=this.getMaskRenderTexture();}else{}this.tmpModelToViewMatrix=new ac();this.tmpMatrix2=new ac();this.tmpMatrixForMask=new ac();this.tmpMatrixForDraw=new ac();this.CHANNEL_COLORS=new Array();var aI=new o();aI=new o();aI.r=0;aI.g=0;aI.b=0;aI.a=1;this.CHANNEL_COLORS.push(aI);aI=new o();aI.r=1;aI.g=0;aI.b=0;aI.a=0;this.CHANNEL_COLORS.push(aI);aI=new o();aI.r=0;aI.g=1;aI.b=0;aI.a=0;this.CHANNEL_COLORS.push(aI);aI=new o();aI.r=0;aI.g=0;aI.b=1;aI.a=0;this.CHANNEL_COLORS.push(aI);for(var aH=0;aH=0;--aH){this.CHANNEL_COLORS.splice(aH,1);}this.CHANNEL_COLORS=[];}this.releaseShader();};W.prototype.releaseShader=function(){var aI=Q.frameBuffers.length;for(var aH=0;aH0){var aM=aQ.gl.getParameter(aQ.gl.FRAMEBUFFER_BINDING);var aW=new Array(4);aW[0]=0;aW[1]=0;aW[2]=aQ.gl.canvas.width;aW[3]=aQ.gl.canvas.height;aQ.gl.viewport(0,0,Q.clippingMaskBufferSize,Q.clippingMaskBufferSize);this.setupLayoutBounds(aK);aQ.gl.bindFramebuffer(aQ.gl.FRAMEBUFFER,Q.frameBuffers[this.curFrameNo].framebuffer);aQ.gl.clearColor(0,0,0,0);aQ.gl.clear(aQ.gl.COLOR_BUFFER_BIT);for(var aO=0;aOa5?aU:a5;var aT=aJ;var aR=aJ;var aS=0;var aP=0;var aL=aV.clippedDrawContextList.length;for(var aM=0;aMaS){aS=a0;}if(aZ>aP){aP=aZ;}}}if(aT==aJ){aV.allClippedDrawRect.x=0;aV.allClippedDrawRect.y=0;aV.allClippedDrawRect.width=0;aV.allClippedDrawRect.height=0;aV.isUsing=false;}else{var aQ=aS-aT;var aY=aP-aR;aV.allClippedDrawRect.x=aT;aV.allClippedDrawRect.y=aR;aV.allClippedDrawRect.width=aQ;aV.allClippedDrawRect.height=aY;aV.isUsing=true;}};W.prototype.setupLayoutBounds=function(aQ){var aI=aQ/W.CHANNEL_COUNT;var aP=aQ%W.CHANNEL_COUNT;aI=~~aI;aP=~~aP;var aH=0;for(var aJ=0;aJ=1){return 1;}}var aS=aQ;var aI=aS*aS;var aH=aS*aI;var aT=aY*aH+aX*aI+aW*aS+aV;return aT;};ah.prototype._$a0=function(){};ah.prototype.setFadeIn=function(aH){this._$dP=aH;};ah.prototype.setFadeOut=function(aH){this._$eo=aH;};ah.prototype._$pT=function(aH){this._$V0=aH;};ah.prototype.getFadeOut=function(){return this._$eo;};ah.prototype._$4T=function(){return this._$eo;};ah.prototype._$mT=function(){return this._$V0;};ah.prototype.getDurationMSec=function(){return -1;};ah.prototype.getLoopDurationMSec=function(){return -1;};ah.prototype.updateParam=function(aJ,aN){if(!aN._$AT||aN._$9L){return;}var aL=P.getUserTimeMSec();if(aN._$z2<0){aN._$z2=aL;aN._$bs=aL;var aM=this.getDurationMSec();if(aN._$Do<0){aN._$Do=(aM<=0)?-1:aN._$z2+aM;}}var aI=this._$V0;var aH=(this._$dP==0)?1:A._$r2(((aL-aN._$bs)/(this._$dP)));var aK=(this._$eo==0||aN._$Do<0)?1:A._$r2(((aN._$Do-aL)/(this._$eo)));aI=aI*aH*aK;if(!((0<=aI&&aI<=1))){console.log("### assert!! ### ");}this.updateParamExe(aJ,aL,aI,aN);if(aN._$Do>0&&aN._$Do0){console.log("\n");}else{if(aH%8==0&&aH>0){console.log(" ");}}console.log("%02X ",(aJ[aH]&255));}console.log("\n");};q._$nr=function(aL,aI,aK){console.log("%s\n",aL);var aH=aI.length;for(var aJ=0;aJ=0;--aJ){var aM=this._$lL[aJ];aM._$oP(aI,this);}this._$oo(aI,aK);this._$M2=this._$Yb();this._$9b=(this._$M2-this._$ks)/aK;this._$ks=this._$M2;}for(var aJ=this._$qP.length-1;aJ>=0;--aJ){var aH=this._$qP[aJ];aH._$YS(aI,this);}this._$iT=aL;};u.prototype._$oo=function(aN,aI){if(aI<0.033){aI=0.033;}var aU=1/aI;this.p1.vx=(this.p1.x-this.p1._$s0)*aU;this.p1.vy=(this.p1.y-this.p1._$70)*aU;this.p1.ax=(this.p1.vx-this.p1._$7L)*aU;this.p1.ay=(this.p1.vy-this.p1._$HL)*aU;this.p1.fx=this.p1.ax*this.p1._$p;this.p1.fy=this.p1.ay*this.p1._$p;this.p1._$xT();var aM=-(Math.atan2((this.p1.y-this.p2.y),this.p1.x-this.p2.x));var aL;var aV;var aR=Math.cos(aM);var aH=Math.sin(aM);var aW=9.8*this.p2._$p;var aQ=(this._$Db*aC._$bS);var aP=(aW*Math.cos(aM-aQ));aL=(aP*aH);aV=(aP*aR);var aK=(-this.p1.fx*aH*aH);var aT=(-this.p1.fy*aH*aR);var aJ=((-this.p2.vx*this._$L2));var aS=((-this.p2.vy*this._$L2));this.p2.fx=((aL+aK+aJ));this.p2.fy=((aV+aT+aS));this.p2.ax=this.p2.fx/this.p2._$p;this.p2.ay=this.p2.fy/this.p2._$p;this.p2.vx+=this.p2.ax*aI;this.p2.vy+=this.p2.ay*aI;this.p2.x+=this.p2.vx*aI;this.p2.y+=this.p2.vy*aI;var aO=(Math.sqrt((this.p1.x-this.p2.x)*(this.p1.x-this.p2.x)+(this.p1.y-this.p2.y)*(this.p1.y-this.p2.y)));this.p2.x=this.p1.x+this._$Fo*(this.p2.x-this.p1.x)/aO;this.p2.y=this.p1.y+this._$Fo*(this.p2.y-this.p1.y)/aO;this.p2.vx=(this.p2.x-this.p2._$s0)*aU;this.p2.vy=(this.p2.y-this.p2._$70)*aU;this.p2._$xT();};function N(){this._$p=1;this.x=0;this.y=0;this.vx=0;this.vy=0;this.ax=0;this.ay=0;this.fx=0;this.fy=0;this._$s0=0;this._$70=0;this._$7L=0;this._$HL=0;}N.prototype._$xT=function(){this._$s0=this.x;this._$70=this.y;this._$7L=this.vx;this._$HL=this.vy;};function at(aJ,aI,aH){this._$wL=null;this.scale=null;this._$V0=null;this._$wL=aJ;this.scale=aI;this._$V0=aH;}at.prototype._$oP=function(aI,aH){};function h(aJ,aK,aI,aH){at.prototype.constructor.call(this,aK,aI,aH);this._$tL=null;this._$tL=aJ;}h.prototype=new at();h.prototype._$oP=function(aJ,aH){var aK=this.scale*aJ.getParamFloat(this._$wL);var aL=aH.getPhysicsPoint1();switch(this._$tL){default:case u.Src.SRC_TO_X:aL.x=aL.x+(aK-aL.x)*this._$V0;break;case u.Src.SRC_TO_Y:aL.y=aL.y+(aK-aL.y)*this._$V0;break;case u.Src.SRC_TO_G_ANGLE:var aI=aH._$qr();aI=aI+(aK-aI)*this._$V0;aH._$pr(aI);break;}};function d(aJ,aI,aH){this._$wL=null;this.scale=null;this._$V0=null;this._$wL=aJ;this.scale=aI;this._$V0=aH;}d.prototype._$YS=function(aI,aH){};function aF(aI,aK,aJ,aH){d.prototype.constructor.call(this,aK,aJ,aH);this._$YP=null;this._$YP=aI;}aF.prototype=new d();aF.prototype._$YS=function(aI,aH){switch(this._$YP){default:case u.Target.TARGET_FROM_ANGLE:aI.setParamFloat(this._$wL,this.scale*aH._$5r(),this._$V0);break;case u.Target.TARGET_FROM_ANGLE_V:aI.setParamFloat(this._$wL,this.scale*aH._$Cs(),this._$V0);break;}};u.Src=function(){};u.Src.SRC_TO_X="SRC_TO_X";u.Src.SRC_TO_Y="SRC_TO_Y";u.Src.SRC_TO_G_ANGLE="SRC_TO_G_ANGLE";u.Target=function(){};u.Target.TARGET_FROM_ANGLE="TARGET_FROM_ANGLE";u.Target.TARGET_FROM_ANGLE_V="TARGET_FROM_ANGLE_V";function X(){if(j){return;}this._$fL=0;this._$gL=0;this._$B0=1;this._$z0=1;this._$qT=0;this.reflectX=false;this.reflectY=false;}X.prototype.init=function(aH){this._$fL=aH._$fL;this._$gL=aH._$gL;this._$B0=aH._$B0;this._$z0=aH._$z0;this._$qT=aH._$qT;this.reflectX=aH.reflectX;this.reflectY=aH.reflectY;};X.prototype._$F0=function(aH){this._$fL=aH._$_T();this._$gL=aH._$_T();this._$B0=aH._$_T();this._$z0=aH._$_T();this._$qT=aH._$_T();if(aH.getFormatVersion()>=ay.LIVE2D_FORMAT_VERSION_V2_10_SDK2){this.reflectX=aH._$po();this.reflectY=aH._$po();}};X.prototype._$e=function(){};var ad=function(){};ad._$ni=function(aL,aJ,aR,aQ,aK,aI,aH,aS,aN){var aM=(aH*aI-aS*aK);if(aM==0){return null;}else{var aO=((aL-aR)*aI-(aJ-aQ)*aK)/aM;var aP;if(aK!=0){aP=(aL-aR-aO*aH)/aK;}else{aP=(aJ-aQ-aO*aS)/aI;}if(isNaN(aP)){aP=(aL-aR-aO*aH)/aK;if(isNaN(aP)){aP=(aJ-aQ-aO*aS)/aI;}if(isNaN(aP)){console.log("a is NaN @UtVector#_$ni() ");console.log("v1x : "+aK);console.log("v1x != 0 ? "+(aK!=0));}}if(aN==null){return new Array(aP,aO);}else{aN[0]=aP;aN[1]=aO;return aN;}}};function av(){if(j){return;}this.x=null;this.y=null;this.width=null;this.height=null;}av.prototype._$8P=function(){return this.x+0.5*this.width;};av.prototype._$6P=function(){return this.y+0.5*this.height;};av.prototype._$EL=function(){return this.x+this.width;};av.prototype._$5T=function(){return this.y+this.height;};av.prototype._$jL=function(aI,aK,aJ,aH){this.x=aI;this.y=aK;this.width=aJ;this.height=aH;};av.prototype._$jL=function(aH){this.x=aH.x;this.y=aH.y;this.width=aH.width;this.height=aH.height;};av.prototype.contains=function(aH,aI){return this.x<=this.x&&this.y<=this.y&&(this.x<=this.x+this.width)&&(this.y<=this.y+this.height);};av.prototype.expand=function(aH,aI){this.x-=aH;this.y-=aI;this.width+=aH*2;this.height+=aI*2;};function aG(){}aG._$Z2=function(bb,bo,bp,a2){var a1=bo._$Q2(bb,bp);var a3=bb._$vs();var ba=bb._$Tr();bo._$zr(a3,ba,a1);if(a1<=0){return a2[a3[0]];}else{if(a1==1){var bj=a2[a3[0]];var bi=a2[a3[1]];var a9=ba[0];return(bj+(bi-bj)*a9)|0;}else{if(a1==2){var bj=a2[a3[0]];var bi=a2[a3[1]];var a0=a2[a3[2]];var aZ=a2[a3[3]];var a9=ba[0];var a8=ba[1];var br=(bj+(bi-bj)*a9)|0;var bq=(a0+(aZ-a0)*a9)|0;return(br+(bq-br)*a8)|0;}else{if(a1==3){var aP=a2[a3[0]];var aO=a2[a3[1]];var bn=a2[a3[2]];var bm=a2[a3[3]];var aK=a2[a3[4]];var aJ=a2[a3[5]];var bg=a2[a3[6]];var bf=a2[a3[7]];var a9=ba[0];var a8=ba[1];var a6=ba[2];var bj=(aP+(aO-aP)*a9)|0;var bi=(bn+(bm-bn)*a9)|0;var a0=(aK+(aJ-aK)*a9)|0;var aZ=(bg+(bf-bg)*a9)|0;var br=(bj+(bi-bj)*a8)|0;var bq=(a0+(aZ-a0)*a8)|0;return(br+(bq-br)*a6)|0;}else{if(a1==4){var aT=a2[a3[0]];var aS=a2[a3[1]];var bu=a2[a3[2]];var bt=a2[a3[3]];var aN=a2[a3[4]];var aM=a2[a3[5]];var bl=a2[a3[6]];var bk=a2[a3[7]];var be=a2[a3[8]];var bc=a2[a3[9]];var aX=a2[a3[10]];var aW=a2[a3[11]];var a7=a2[a3[12]];var a5=a2[a3[13]];var aR=a2[a3[14]];var aQ=a2[a3[15]];var a9=ba[0];var a8=ba[1];var a6=ba[2];var a4=ba[3];var aP=(aT+(aS-aT)*a9)|0;var aO=(bu+(bt-bu)*a9)|0;var bn=(aN+(aM-aN)*a9)|0;var bm=(bl+(bk-bl)*a9)|0;var aK=(be+(bc-be)*a9)|0;var aJ=(aX+(aW-aX)*a9)|0;var bg=(a7+(a5-a7)*a9)|0;var bf=(aR+(aQ-aR)*a9)|0;var bj=(aP+(aO-aP)*a8)|0;var bi=(bn+(bm-bn)*a8)|0;var a0=(aK+(aJ-aK)*a8)|0;var aZ=(bg+(bf-bg)*a8)|0;var br=(bj+(bi-bj)*a6)|0;var bq=(a0+(aZ-a0)*a6)|0;return(br+(bq-br)*a4)|0;}else{var aV=1<=ay._$T7){this.clipID=aH._$nP();this.clipIDList=this.convertClipIDForV2_11(this.clipID);}else{this.clipIDList=[];}this._$MS(this._$Lb);};ae.prototype.getClipIDList=function(){return this.clipIDList;};ae.prototype.init=function(aH){};ae.prototype._$Nr=function(aH,aI){aI._$IS[0]=false;aI._$Us=aG._$Z2(aH,this._$GS,aI._$IS,this._$Lb);if(Q._$Zs){}else{if(aI._$IS[0]){return;}}aI._$7s=aG._$br(aH,this._$GS,aI._$IS,this._$mS);};ae.prototype._$2b=function(aH,aI){};ae.prototype.getDrawDataID=function(){return this._$gP;};ae.prototype._$j2=function(aH){this._$gP=aH;};ae.prototype.getOpacity=function(aH,aI){return aI._$7s;};ae.prototype._$zS=function(aH,aI){return aI._$Us;};ae.prototype._$MS=function(aJ){for(var aI=aJ.length-1;aI>=0;--aI){var aH=aJ[aI];if(aHae._$R2){ae._$R2=aH;}}}};ae.prototype.getTargetBaseDataID=function(){return this._$dr;};ae.prototype._$gs=function(aH){this._$dr=aH;};ae.prototype._$32=function(){return(this._$dr!=null&&(this._$dr!=n._$2o()));};ae.prototype.preDraw=function(aJ,aH,aI){};ae.prototype.draw=function(aJ,aH,aI){};ae.prototype.getType=function(){};ae.prototype._$B2=function(aI,aH,aJ){};function ax(){if(j){return;}this._$Eb=ax._$ps;this._$lT=1;this._$C0=1;this._$tT=1;this._$WL=1;this.culling=false;this.matrix4x4=new Float32Array(16);this.premultipliedAlpha=false;this.anisotropy=0;this.clippingProcess=ax.CLIPPING_PROCESS_NONE;this.clipBufPre_clipContextMask=null;this.clipBufPre_clipContextDraw=null;this.CHANNEL_COLORS=new Array();}ax._$ps=32;ax.CLIPPING_PROCESS_NONE=0;ax.CLIPPING_PROCESS_OVERWRITE_ALPHA=1;ax.CLIPPING_PROCESS_MULTIPLY_ALPHA=2;ax.CLIPPING_PROCESS_DRAW=3;ax.CLIPPING_PROCESS_CLEAR_ALPHA=4;ax.prototype.setChannelFlagAsColor=function(aH,aI){this.CHANNEL_COLORS[aH]=aI;};ax.prototype.getChannelFlagAsColor=function(aH){return this.CHANNEL_COLORS[aH];};ax.prototype._$ZT=function(){};ax.prototype._$Uo=function(aM,aK,aJ,aL,aN,aI,aH){};ax.prototype._$Rs=function(){return -1;};ax.prototype._$Ds=function(aH){};ax.prototype.setBaseColor=function(aK,aJ,aI,aH){if(aK<0){aK=0;}else{if(aK>1){aK=1;}}if(aJ<0){aJ=0;}else{if(aJ>1){aJ=1;}}if(aI<0){aI=0;}else{if(aI>1){aI=1;}}if(aH<0){aH=0;}else{if(aH>1){aH=1;}}this._$lT=aK;this._$C0=aJ;this._$tT=aI;this._$WL=aH;};ax.prototype._$WP=function(aH){this.culling=aH;};ax.prototype.setMatrix=function(aH){for(var aI=0;aI<16;aI++){this.matrix4x4[aI]=aH[aI];}};ax.prototype._$IT=function(){return this.matrix4x4;};ax.prototype.setPremultipliedAlpha=function(aH){this.premultipliedAlpha=aH;};ax.prototype.isPremultipliedAlpha=function(){return this.premultipliedAlpha;};ax.prototype.setAnisotropy=function(aH){this.anisotropy=aH;};ax.prototype.getAnisotropy=function(){return this.anisotropy;};ax.prototype.getClippingProcess=function(){return this.clippingProcess;};ax.prototype.setClippingProcess=function(aH){this.clippingProcess=aH;};ax.prototype.setClipBufPre_clipContextForMask=function(aH){this.clipBufPre_clipContextMask=aH;};ax.prototype.getClipBufPre_clipContextMask=function(){return this.clipBufPre_clipContextMask;};ax.prototype.setClipBufPre_clipContextForDraw=function(aH){this.clipBufPre_clipContextDraw=aH;};ax.prototype.getClipBufPre_clipContextDraw=function(){return this.clipBufPre_clipContextDraw;};function o(){if(j){return;}this.a=1;this.r=1;this.g=1;this.b=1;this.scale=1;this._$ho=1;this.blendMode=Q.L2D_COLOR_BLEND_MODE_MULT;}function c(){if(j){return;}this._$kP=null;this._$dr=null;this._$Ai=true;this._$mS=null;}c._$ur=-2;c._$c2=1;c._$_b=2;c.prototype._$F0=function(aH){this._$kP=aH._$nP();this._$dr=aH._$nP();};c.prototype.readV2_opacity=function(aH){if(aH.getFormatVersion()>=ay.LIVE2D_FORMAT_VERSION_V2_10_SDK2){this._$mS=aH._$Tb();}};c.prototype.init=function(aH){};c.prototype._$Nr=function(aI,aH){};c.prototype.interpolateOpacity=function(aJ,aK,aI,aH){if(this._$mS==null){aI.setInterpolatedOpacity(1);}else{aI.setInterpolatedOpacity(aG._$br(aJ,aK,aH,this._$mS));}};c.prototype._$2b=function(aI,aH){};c.prototype._$nb=function(aL,aK,aM,aH,aI,aJ,aN){};c.prototype.getType=function(){};c.prototype._$gs=function(aH){this._$dr=aH;};c.prototype._$a2=function(aH){this._$kP=aH;};c.prototype.getTargetBaseDataID=function(){return this._$dr;};c.prototype.getBaseDataID=function(){return this._$kP;};c.prototype._$32=function(){return(this._$dr!=null&&(this._$dr!=n._$2o()));};function P(){}P._$W2=0;P._$CS=P._$W2;P._$Mo=function(){return true;};P._$XP=function(aI){try{var aJ=getTimeMSec();while(getTimeMSec()-aJ=aJ.length){return false;}for(var aI=aL;aI=0;--aJ){var aI=this._$Ob[aJ].getParamIndex(aH);if(aI==aA._$ds){aI=aK.getParamIndex(this._$Ob[aJ].getParamID());}if(aK._$Xb(aI)){return true;}}return false;};g.prototype._$Q2=function(aL,aV){var aX=this._$Ob.length;var aJ=aL._$v2();var aN=0;var aI;var aQ;for(var aK=0;aKaw._$Qb){console.log("err 23245\n");}var aS=this._$Ob.length;var aK=1;var aH=1;var aJ=0;for(var aQ=0;aQ=0;--aK){aM[aK]=aL[aK];}}else{this.mult_fast(aI,aH,aM,aJ);}};ac.prototype.mult_fast=function(aI,aH,aK,aJ){if(aJ){aK[0]=aI[0]*aH[0]+aI[4]*aH[1]+aI[8]*aH[2];aK[4]=aI[0]*aH[4]+aI[4]*aH[5]+aI[8]*aH[6];aK[8]=aI[0]*aH[8]+aI[4]*aH[9]+aI[8]*aH[10];aK[12]=aI[0]*aH[12]+aI[4]*aH[13]+aI[8]*aH[14]+aI[12];aK[1]=aI[1]*aH[0]+aI[5]*aH[1]+aI[9]*aH[2];aK[5]=aI[1]*aH[4]+aI[5]*aH[5]+aI[9]*aH[6];aK[9]=aI[1]*aH[8]+aI[5]*aH[9]+aI[9]*aH[10];aK[13]=aI[1]*aH[12]+aI[5]*aH[13]+aI[9]*aH[14]+aI[13];aK[2]=aI[2]*aH[0]+aI[6]*aH[1]+aI[10]*aH[2];aK[6]=aI[2]*aH[4]+aI[6]*aH[5]+aI[10]*aH[6];aK[10]=aI[2]*aH[8]+aI[6]*aH[9]+aI[10]*aH[10];aK[14]=aI[2]*aH[12]+aI[6]*aH[13]+aI[10]*aH[14]+aI[14];aK[3]=aK[7]=aK[11]=0;aK[15]=1;}else{aK[0]=aI[0]*aH[0]+aI[4]*aH[1]+aI[8]*aH[2]+aI[12]*aH[3];aK[4]=aI[0]*aH[4]+aI[4]*aH[5]+aI[8]*aH[6]+aI[12]*aH[7];aK[8]=aI[0]*aH[8]+aI[4]*aH[9]+aI[8]*aH[10]+aI[12]*aH[11];aK[12]=aI[0]*aH[12]+aI[4]*aH[13]+aI[8]*aH[14]+aI[12]*aH[15];aK[1]=aI[1]*aH[0]+aI[5]*aH[1]+aI[9]*aH[2]+aI[13]*aH[3];aK[5]=aI[1]*aH[4]+aI[5]*aH[5]+aI[9]*aH[6]+aI[13]*aH[7];aK[9]=aI[1]*aH[8]+aI[5]*aH[9]+aI[9]*aH[10]+aI[13]*aH[11];aK[13]=aI[1]*aH[12]+aI[5]*aH[13]+aI[9]*aH[14]+aI[13]*aH[15];aK[2]=aI[2]*aH[0]+aI[6]*aH[1]+aI[10]*aH[2]+aI[14]*aH[3];aK[6]=aI[2]*aH[4]+aI[6]*aH[5]+aI[10]*aH[6]+aI[14]*aH[7];aK[10]=aI[2]*aH[8]+aI[6]*aH[9]+aI[10]*aH[10]+aI[14]*aH[11];aK[14]=aI[2]*aH[12]+aI[6]*aH[13]+aI[10]*aH[14]+aI[14]*aH[15];aK[3]=aI[3]*aH[0]+aI[7]*aH[1]+aI[11]*aH[2]+aI[15]*aH[3];aK[7]=aI[3]*aH[4]+aI[7]*aH[5]+aI[11]*aH[6]+aI[15]*aH[7];aK[11]=aI[3]*aH[8]+aI[7]*aH[9]+aI[11]*aH[10]+aI[15]*aH[11];aK[15]=aI[3]*aH[12]+aI[7]*aH[13]+aI[11]*aH[14]+aI[15]*aH[15];}};ac.prototype.translate=function(aH,aJ,aI){this.m[12]=this.m[0]*aH+this.m[4]*aJ+this.m[8]*aI+this.m[12];this.m[13]=this.m[1]*aH+this.m[5]*aJ+this.m[9]*aI+this.m[13];this.m[14]=this.m[2]*aH+this.m[6]*aJ+this.m[10]*aI+this.m[14];this.m[15]=this.m[3]*aH+this.m[7]*aJ+this.m[11]*aI+this.m[15];};ac.prototype.scale=function(aJ,aI,aH){this.m[0]*=aJ;this.m[4]*=aI;this.m[8]*=aH;this.m[1]*=aJ;this.m[5]*=aI;this.m[9]*=aH;this.m[2]*=aJ;this.m[6]*=aI;this.m[10]*=aH;this.m[3]*=aJ;this.m[7]*=aI;this.m[11]*=aH;};ac.prototype.rotateX=function(aH){var aK=aC.fcos(aH);var aJ=aC._$9(aH);var aI=this.m[4];this.m[4]=aI*aK+this.m[8]*aJ;this.m[8]=aI*-aJ+this.m[8]*aK;aI=this.m[5];this.m[5]=aI*aK+this.m[9]*aJ;this.m[9]=aI*-aJ+this.m[9]*aK;aI=this.m[6];this.m[6]=aI*aK+this.m[10]*aJ;this.m[10]=aI*-aJ+this.m[10]*aK;aI=this.m[7];this.m[7]=aI*aK+this.m[11]*aJ;this.m[11]=aI*-aJ+this.m[11]*aK;};ac.prototype.rotateY=function(aH){var aK=aC.fcos(aH);var aJ=aC._$9(aH);var aI=this.m[0];this.m[0]=aI*aK+this.m[8]*-aJ;this.m[8]=aI*aJ+this.m[8]*aK;aI=this.m[1];this.m[1]=aI*aK+this.m[9]*-aJ;this.m[9]=aI*aJ+this.m[9]*aK;aI=m[2];this.m[2]=aI*aK+this.m[10]*-aJ;this.m[10]=aI*aJ+this.m[10]*aK;aI=m[3];this.m[3]=aI*aK+this.m[11]*-aJ;this.m[11]=aI*aJ+this.m[11]*aK;};ac.prototype.rotateZ=function(aH){var aK=aC.fcos(aH);var aJ=aC._$9(aH);var aI=this.m[0];this.m[0]=aI*aK+this.m[4]*aJ;this.m[4]=aI*-aJ+this.m[4]*aK;aI=this.m[1];this.m[1]=aI*aK+this.m[5]*aJ;this.m[5]=aI*-aJ+this.m[5]*aK;aI=this.m[2];this.m[2]=aI*aK+this.m[6]*aJ;this.m[6]=aI*-aJ+this.m[6]*aK;aI=this.m[3];this.m[3]=aI*aK+this.m[7]*aJ;this.m[7]=aI*-aJ+this.m[7]*aK;};function Z(aH){if(j){return;}ak.prototype.constructor.call(this,aH);}Z.prototype=new ak();Z._$tP=new Object();Z._$27=function(){Z._$tP.clear();};Z.getID=function(aH){var aI=Z._$tP[aH];if(aI==null){aI=new Z(aH);Z._$tP[aH]=aI;}return aI;};Z.prototype._$3s=function(){return new Z();};function aD(){if(j){return;}this._$7=1;this._$f=0;this._$H=0;this._$g=1;this._$k=0;this._$w=0;this._$hi=STATE_IDENTITY;this._$Z=_$pS;}aD._$kS=-1;aD._$pS=0;aD._$hb=1;aD.STATE_IDENTITY=0;aD._$gb=1;aD._$fo=2;aD._$go=4;aD.prototype.transform=function(aK,aI,aH){var aT,aS,aR,aM,aL,aJ;var aQ=0;var aN=0;switch(this._$hi){default:return;case (aD._$go|aD._$fo|aD._$gb):aT=this._$7;aS=this._$H;aR=this._$k;aM=this._$f;aL=this._$g;aJ=this._$w;while(--aH>=0){var aP=aK[aQ++];var aO=aK[aQ++];aI[aN++]=(aT*aP+aS*aO+aR);aI[aN++]=(aM*aP+aL*aO+aJ);}return;case (aD._$go|aD._$fo):aT=this._$7;aS=this._$H;aM=this._$f;aL=this._$g;while(--aH>=0){var aP=aK[aQ++];var aO=aK[aQ++];aI[aN++]=(aT*aP+aS*aO);aI[aN++]=(aM*aP+aL*aO);}return;case (aD._$go|aD._$gb):aS=this._$H;aR=this._$k;aM=this._$f;aJ=this._$w;while(--aH>=0){var aP=aK[aQ++];aI[aN++]=(aS*aK[aQ++]+aR);aI[aN++]=(aM*aP+aJ);}return;case (aD._$go):aS=this._$H;aM=this._$f;while(--aH>=0){var aP=aK[aQ++];aI[aN++]=(aS*aK[aQ++]);aI[aN++]=(aM*aP);}return;case (aD._$fo|aD._$gb):aT=this._$7;aR=this._$k;aL=this._$g;aJ=this._$w;while(--aH>=0){aI[aN++]=(aT*aK[aQ++]+aR);aI[aN++]=(aL*aK[aQ++]+aJ);}return;case (aD._$fo):aT=this._$7;aL=this._$g;while(--aH>=0){aI[aN++]=(aT*aK[aQ++]);aI[aN++]=(aL*aK[aQ++]);}return;case (aD._$gb):aR=this._$k;aJ=this._$w;while(--aH>=0){aI[aN++]=(aK[aQ++]+aR);aI[aN++]=(aK[aQ++]+aJ);}return;case (aD.STATE_IDENTITY):if(aK!=aI||aQ!=aN){P._$jT(aK,aQ,aI,aN,aH*2);}return;}};aD.prototype.update=function(){if(this._$H==0&&this._$f==0){if(this._$7==1&&this._$g==1){if(this._$k==0&&this._$w==0){this._$hi=aD.STATE_IDENTITY;this._$Z=aD._$pS;}else{this._$hi=aD._$gb;this._$Z=aD._$hb;}}else{if(this._$k==0&&this._$w==0){this._$hi=aD._$fo;this._$Z=aD._$kS;}else{this._$hi=(aD._$fo|aD._$gb);this._$Z=aD._$kS;}}}else{if(this._$7==0&&this._$g==0){if(this._$k==0&&this._$w==0){this._$hi=aD._$go;this._$Z=aD._$kS;}else{this._$hi=(aD._$go|aD._$gb);this._$Z=aD._$kS;}}else{if(this._$k==0&&this._$w==0){this._$hi=(aD._$go|aD._$fo);this._$Z=aD._$kS;}else{this._$hi=(aD._$go|aD._$fo|aD._$gb);this._$Z=aD._$kS;}}}};aD.prototype._$RT=function(aK){this._$IT(aK);var aJ=aK[0];var aH=aK[2];var aN=aK[1];var aM=aK[3];var aI=Math.sqrt(aJ*aJ+aN*aN);var aL=aJ*aM-aH*aN;if(aI==0){if(Q._$so){console.log("affine._$RT() / rt==0");}}else{aK[0]=aI;aK[1]=aL/aI;aK[2]=(aN*aM+aJ*aH)/aL;aK[3]=Math.atan2(aN,aJ);}};aD.prototype._$ho=function(aN,aM,aI,aH){var aL=new Float32Array(6);var aK=new Float32Array(6);aN._$RT(aL);aM._$RT(aK);var aJ=new Float32Array(6);aJ[0]=aL[0]+(aK[0]-aL[0])*aI;aJ[1]=aL[1]+(aK[1]-aL[1])*aI;aJ[2]=aL[2]+(aK[2]-aL[2])*aI;aJ[3]=aL[3]+(aK[3]-aL[3])*aI;aJ[4]=aL[4]+(aK[4]-aL[4])*aI;aJ[5]=aL[5]+(aK[5]-aL[5])*aI;aH._$CT(aJ);};aD.prototype._$CT=function(aJ){var aI=Math.cos(aJ[3]);var aH=Math.sin(aJ[3]);this._$7=aJ[0]*aI;this._$f=aJ[0]*aH;this._$H=aJ[1]*(aJ[2]*aI-aH);this._$g=aJ[1]*(aJ[2]*aH+aI);this._$k=aJ[4];this._$w=aJ[5];this.update();};aD.prototype._$IT=function(aH){aH[0]=this._$7;aH[1]=this._$f;aH[2]=this._$H;aH[3]=this._$g;aH[4]=this._$k;aH[5]=this._$w;};function Y(){if(j){return;}ah.prototype.constructor.call(this);this.motions=new Array();this._$7r=null;this._$7r=Y._$Co++;this._$D0=30;this._$yT=0;this._$E=true;this.loopFadeIn=true;this._$AS=-1;_$a0();}Y.prototype=new ah();Y._$cs="VISIBLE:";Y._$ar="LAYOUT:";Y._$Co=0;Y._$D2=[];Y._$1T=1;Y.loadMotion=function(aR){var aM=new Y();var aI=[0];var aP=aR.length;aM._$yT=0;for(var aJ=0;aJ=0){if(aK==aT+4&&aR[aT+1]=="f"&&aR[aT+2]=="p"&&aR[aT+3]=="s"){aO=true;}for(aJ=aK+1;aJ0){if(aO&&5=0){var aN=new t();if(G.startsWith(aR,aT,Y._$cs)){aN._$RP=t._$hs;aN._$4P=new String(aR,aT,aK-aT);}else{if(G.startsWith(aR,aT,Y._$ar)){aN._$4P=new String(aR,aT+7,aK-aT-7);if(G.startsWith(aR,aT+7,"ANCHOR_X")){aN._$RP=t._$xs;}else{if(G.startsWith(aR,aT+7,"ANCHOR_Y")){aN._$RP=t._$us;}else{if(G.startsWith(aR,aT+7,"SCALE_X")){aN._$RP=t._$qs;}else{if(G.startsWith(aR,aT+7,"SCALE_Y")){aN._$RP=t._$Ys;}else{if(G.startsWith(aR,aT+7,"X")){aN._$RP=t._$ws;}else{if(G.startsWith(aR,aT+7,"Y")){aN._$RP=t._$Ns;}}}}}}}else{aN._$RP=t._$Fr;aN._$4P=new String(aR,aT,aK-aT);}}aM.motions.push(aN);var aS=0;Y._$D2.clear();for(aJ=aK+1;aJ0){Y._$D2.push(aL);aS++;var aH=aI[0];if(aHaM._$yT){aM._$yT=aS;}}}}aM._$AS=((1000*aM._$yT)/aM._$D0)|0;return aM;};Y.prototype.getDurationMSec=function(){return this._$AS;};Y.prototype.dump=function(){for(var aJ=0;aJ=aK?aK-1:aJ)];aH.setParamFloat(aQ,aT);}else{if(t._$ws<=aS._$RP&&aS._$RP<=t._$Ys){}else{var aR=aH.getParamFloat(aQ);var aY=aS._$I0[(aJ>=aK?aK-1:aJ)];var aW=aS._$I0[(aJ+1>=aK?aK-1:aJ+1)];var aI=aY+(aW-aY)*aP;var aN=aR+(aI-aR)*aO;aH.setParamFloat(aQ,aN);}}}if(aJ>=this._$yT){if(this._$E){aX._$z2=aL;if(this.loopFadeIn){aX._$bs=aL;}}else{aX._$9L=true;}}};Y.prototype._$r0=function(){return this._$E;};Y.prototype._$aL=function(aH){this._$E=aH;};Y.prototype.isLoopFadeIn=function(){return this.loopFadeIn;};Y.prototype.setLoopFadeIn=function(aH){this.loopFadeIn=aH;};function aE(){this._$P=new Float32Array(100);this.size=0;}aE.prototype.clear=function(){this.size=0;};aE.prototype.add=function(aI){if(this._$P.length<=this.size){var aH=new Float32Array(this.size*2);P._$jT(this._$P,0,aH,0,this.size);this._$P=aH;}this._$P[this.size++]=aI;};aE.prototype._$BL=function(){var aH=new Float32Array(this.size);P._$jT(this._$P,0,aH,0,this.size);return aH;};function t(){this._$4P=null;this._$I0=null;this._$RP=null;}t._$Fr=0;t._$hs=1;t._$ws=100;t._$Ns=101;t._$xs=102;t._$us=103;t._$qs=104;t._$Ys=105;function aw(){}aw._$Ms=1;aw._$Qs=2;aw._$i2=0;aw._$No=2;aw._$do=aw._$Ms;aw._$Ls=true;aw._$1r=5;aw._$Qb=65;aw._$J=0.0001;aw._$FT=0.001;aw._$Ss=3;function ay(){}ay._$o7=6;ay._$S7=7;ay._$s7=8;ay._$77=9;ay.LIVE2D_FORMAT_VERSION_V2_10_SDK2=10;ay.LIVE2D_FORMAT_VERSION_V2_11_SDK2_1=11;ay._$T7=ay.LIVE2D_FORMAT_VERSION_V2_11_SDK2_1;ay._$Is=-2004318072;ay._$h0=0;ay._$4L=23;ay._$7P=33;ay._$uT=function(aH){console.log("_$bo :: _$6 _$mo _$E0 : %d\n",aH);};ay._$9o=function(aH){if(aH<40){ay._$uT(aH);return null;}else{if(aH<50){ay._$uT(aH);return null;}else{if(aH<60){ay._$uT(aH);return null;}else{if(aH<100){switch(aH){case 65:return new E();case 66:return new g();case 67:return new aA();case 68:return new ab();case 69:return new X();case 70:return new b();default:ay._$uT(aH);return null;}}else{if(aH<150){switch(aH){case 131:return new f();case 133:return new s();case 136:return new w();case 137:return new an();case 142:return new aq();}}}}}}ay._$uT(aH);return null;};function y(aH){if(j){return;}this._$QT=true;this._$co=-1;this._$qo=0;this._$pb=new Array(y._$is);this._$_2=new Float32Array(y._$is);this._$vr=new Float32Array(y._$is);this._$Rr=new Float32Array(y._$is);this._$Or=new Float32Array(y._$is);this._$fs=new Float32Array(y._$is);this._$Js=new Array(y._$is);this._$3S=new Array();this._$aS=new Array();this._$Bo=null;this._$F2=new Array();this._$db=new Array();this._$8b=new Array();this._$Hr=new Array();this._$Ws=null;this._$Vs=null;this._$Er=null;this._$Es=new Int16Array(aw._$Qb);this._$ZP=new Float32Array(aw._$1r*2);this._$Ri=aH;this._$b0=y._$HP++;this.clipManager=null;this.dp_webgl=null;}y._$HP=0;y._$_0=true;y._$V2=-1;y._$W0=-1;y._$jr=false;y._$ZS=true;y._$tr=(-1000000);y._$lr=(1000000);y._$is=32;y._$e=false;y.prototype.getDrawDataIndex=function(aI){for(var aH=this._$aS.length-1;aH>=0;--aH){if(this._$aS[aH]!=null&&this._$aS[aH].getDrawDataID()==aI){return aH;}}return -1;};y.prototype.getDrawData=function(aH){if(aH instanceof Z){if(this._$Bo==null){this._$Bo=new Object();var aJ=this._$aS.length;for(var aI=0;aI0){this.release();}var aO=this._$Ri.getModelImpl();var aT=aO._$Xr();var aS=aT.length;var aH=new Array();var a3=new Array();for(var aV=0;aV=0){this._$3S.push(aL);this._$db.push(a3[aV]);aH[aV]=null;aX=true;}}if(!aX){break;}}var aI=aO._$E2();if(aI!=null){var aJ=aI._$1s();if(aJ!=null){var aW=aJ.length;for(var aV=0;aV=0;aW--){this._$Js[aW]=y._$jr;}this._$QT=false;if(y._$e){q.dump("_$eL");}return aX;};y.prototype.preDraw=function(aH){if(this.clipManager!=null){aH._$ZT();this.clipManager.setupClip(this,aH);}};y.prototype.draw=function(aM){if(this._$Ws==null){q._$li("call _$Ri.update() before _$Ri.draw() ");return;}var aP=this._$Ws.length;aM._$ZT();for(var aK=0;aK=0;--aI){if(this._$pb[aI]==aH){return aI;}}return this._$02(aH,0,y._$tr,y._$lr);};y.prototype._$BS=function(aH){return this.getBaseDataIndex(aH);};y.prototype.getBaseDataIndex=function(aH){for(var aI=this._$3S.length-1;aI>=0;--aI){if(this._$3S[aI]!=null&&this._$3S[aI].getBaseDataID()==aH){return aI;}}return -1;};y.prototype._$UT=function(aJ,aH){var aI=new Float32Array(aH);P._$jT(aJ,0,aI,0,aJ.length);return aI;};y.prototype._$02=function(aN,aM,aL,aH){if(this._$qo>=this._$pb.length){var aK=this._$pb.length;var aJ=new Array(aK*2);P._$jT(this._$pb,0,aJ,0,aK);this._$pb=aJ;this._$_2=this._$UT(this._$_2,aK*2);this._$vr=this._$UT(this._$vr,aK*2);this._$Rr=this._$UT(this._$Rr,aK*2);this._$Or=this._$UT(this._$Or,aK*2);var aI=new Array();P._$jT(this._$Js,0,aI,0,aK);this._$Js=aI;}this._$pb[this._$qo]=aN;this._$_2[this._$qo]=aM;this._$vr[this._$qo]=aM;this._$Rr[this._$qo]=aL;this._$Or[this._$qo]=aH;this._$Js[this._$qo]=y._$ZS;return this._$qo++;};y.prototype._$Zo=function(aI,aH){this._$3S[aI]=aH;};y.prototype.setParamFloat=function(aH,aI){if(aIthis._$Or[aH]){aI=this._$Or[aH];}this._$_2[aH]=aI;};y.prototype.loadParam=function(){var aH=this._$_2.length;if(aH>this._$fs.length){aH=this._$fs.length;}P._$jT(this._$fs,0,this._$_2,0,aH);};y.prototype.saveParam=function(){var aH=this._$_2.length;if(aH>this._$fs.length){this._$fs=new Float32Array(aH);}P._$jT(this._$_2,0,this._$fs,0,aH);};y.prototype._$v2=function(){return this._$co;};y.prototype._$WS=function(){return this._$QT;};y.prototype._$Xb=function(aH){return this._$Js[aH]==y._$ZS;};y.prototype._$vs=function(){return this._$Es;};y.prototype._$Tr=function(){return this._$ZP;};y.prototype.getBaseData=function(aH){return this._$3S[aH];};y.prototype.getParamFloat=function(aH){return this._$_2[aH];};y.prototype.getParamMax=function(aH){return this._$Or[aH];};y.prototype.getParamMin=function(aH){return this._$Rr[aH];};y.prototype.setPartsOpacity=function(aJ,aH){var aI=this._$Hr[aJ];aI.setPartsOpacity(aH);};y.prototype.getPartsOpacity=function(aI){var aH=this._$Hr[aI];return aH.getPartsOpacity();};y.prototype.getPartsDataIndex=function(aI){for(var aH=this._$F2.length-1;aH>=0;--aH){if(this._$F2[aH]!=null&&this._$F2[aH]._$p2()==aI){return aH;}}return -1;};y.prototype._$q2=function(aH){return this._$db[aH];};y.prototype._$C2=function(aH){return this._$8b[aH];};y.prototype._$Bb=function(aH){return this._$Hr[aH];};y.prototype._$5s=function(aO,aK){var aJ=this._$Ws.length;var aN=aO;for(var aL=0;aL0){aL+=aK;}return aI;};ap._$C=function(aJ){var aI=null;var aL=null;try{aI=(aJ instanceof Array)?aJ:new _$Xs(aJ,8192);aL=new _$js();var aM=1000;var aK;var aH=new Int8Array(aM);while((aK=aI.read(aH))>0){aL.write(aH,0,aK);}return aL._$TS();}finally{if(aJ!=null){aJ.close();}if(aL!=null){aL.flush();aL.close();}}};function ar(){if(j){return;}this._$12=null;this._$bb=null;this._$_L=null;this._$jo=null;this._$iL=null;this._$0L=null;this._$Br=null;this._$Dr=null;this._$Cb=null;this._$mr=null;this._$_L=az.STATE_FIRST;this._$Br=4000;this._$Dr=100;this._$Cb=50;this._$mr=150;this._$jo=true;this._$iL="PARAM_EYE_L_OPEN";this._$0L="PARAM_EYE_R_OPEN";}ar.prototype._$T2=function(){var aI=P.getUserTimeMSec();var aH=Math._$10();return(aI+aH*(2*this._$Br-1));};ar.prototype._$uo=function(aH){this._$Br=aH;};ar.prototype._$QS=function(aI,aH,aJ){this._$Dr=aI;this._$Cb=aH;this._$mr=aJ;};ar.prototype._$7T=function(aI){var aK=P.getUserTimeMSec();var aH;var aJ=0;switch(this._$_L){case STATE_CLOSING:aJ=(aK-this._$bb)/this._$Dr;if(aJ>=1){aJ=1;this._$_L=az.STATE_CLOSED;this._$bb=aK;}aH=1-aJ;break;case STATE_CLOSED:aJ=(aK-this._$bb)/this._$Cb;if(aJ>=1){this._$_L=az.STATE_OPENING;this._$bb=aK;}aH=0;break;case STATE_OPENING:aJ=(aK-this._$bb)/this._$mr;if(aJ>=1){aJ=1;this._$_L=az.STATE_INTERVAL;this._$12=this._$T2();}aH=aJ;break;case STATE_INTERVAL:if(this._$120.9?Q.EXPAND_W:0;this.gl.drawElements(aL,aP,aI,aQ,aM,aN,this.transform,aJ);};x.prototype._$Rs=function(){throw new Error("_$Rs");};x.prototype._$Ds=function(aH){throw new Error("_$Ds");};x.prototype._$K2=function(){for(var aH=0;aH=0;--aI){var aH=aJ[aI];if(aHa._$R2){a._$R2=aH;}}}};a._$or=function(){return a._$52;};a._$Pr=function(){return a._$R2;};a.prototype._$F0=function(aH){this._$gP=aH._$nP();this._$dr=aH._$nP();this._$GS=aH._$nP();this._$qb=aH._$6L();this._$Lb=aH._$cS();this._$mS=aH._$Tb();if(aH.getFormatVersion()>=ay._$T7){this.clipID=aH._$nP();this.clipIDList=this.convertClipIDForV2_11(this.clipID);}else{this.clipIDList=null;}a._$Sb(this._$Lb);};a.prototype.getClipIDList=function(){return this.clipIDList;};a.prototype._$Nr=function(aI,aH){aH._$IS[0]=false;aH._$Us=aG._$Z2(aI,this._$GS,aH._$IS,this._$Lb);if(Q._$Zs){}else{if(aH._$IS[0]){return;}}aH._$7s=aG._$br(aI,this._$GS,aH._$IS,this._$mS);};a.prototype._$2b=function(aH){};a.prototype.getDrawDataID=function(){return this._$gP;};a.prototype._$j2=function(aH){this._$gP=aH;};a.prototype.getOpacity=function(aH,aI){return aI._$7s;};a.prototype._$zS=function(aH,aI){return aI._$Us;};a.prototype.getTargetBaseDataID=function(){return this._$dr;};a.prototype._$gs=function(aH){this._$dr=aH;};a.prototype._$32=function(){return(this._$dr!=null&&(this._$dr!=n._$2o()));};a.prototype.getType=function(){};function aq(){if(j){return;}this._$NL=null;this._$3S=null;this._$aS=null;aq._$42++;}aq._$42=0;aq.prototype._$1b=function(){return this._$3S;};aq.prototype.getDrawDataList=function(){return this._$aS;};aq.prototype._$F0=function(aH){this._$NL=aH._$nP();this._$aS=aH._$nP();this._$3S=aH._$nP();};aq.prototype._$kr=function(aH){aH._$Zo(this._$3S);aH._$xo(this._$aS);this._$3S=null;this._$aS=null;};function v(){if(j){return;}aa.prototype.constructor.call(this);this._$zo=new x();}v.prototype=new aa();v.loadModel=function(aI){var aH=new v();aa._$62(aH,aI);return aH;};v.loadModel=function(aI){var aH=new v();aa._$62(aH,aI);return aH;};v._$to=function(){var aH=new v();return aH;};v._$er=function(aM){var aJ=new _$5("../_$_r/_$t0/_$Ri/_$_P._$d");if(aJ.exists()==false){throw new _$ls("_$t0 _$_ _$6 _$Ui :: "+aJ._$PL());}var aH=["../_$_r/_$t0/_$Ri/_$_P.512/_$CP._$1","../_$_r/_$t0/_$Ri/_$_P.512/_$vP._$1","../_$_r/_$t0/_$Ri/_$_P.512/_$EP._$1","../_$_r/_$t0/_$Ri/_$_P.512/_$pP._$1"];var aK=v.loadModel(aJ._$3b());for(var aI=0;aI=0){if(aK==aV+4&&p(aT,aV+1)=="f"&&p(aT,aV+2)=="p"&&p(aT,aV+3)=="s"){aP=true;}for(aJ=aK+1;aJ0){if(aP&&5=0){var aO=new t();if(G.startsWith(aT,aV,ao._$cs)){aO._$RP=t._$hs;aO._$4P=G.createString(aT,aV,aK-aV);}else{if(G.startsWith(aT,aV,ao._$ar)){aO._$4P=G.createString(aT,aV+7,aK-aV-7);if(G.startsWith(aT,aV+7,"ANCHOR_X")){aO._$RP=t._$xs;}else{if(G.startsWith(aT,aV+7,"ANCHOR_Y")){aO._$RP=t._$us;}else{if(G.startsWith(aT,aV+7,"SCALE_X")){aO._$RP=t._$qs;}else{if(G.startsWith(aT,aV+7,"SCALE_Y")){aO._$RP=t._$Ys;}else{if(G.startsWith(aT,aV+7,"X")){aO._$RP=t._$ws;}else{if(G.startsWith(aT,aV+7,"Y")){aO._$RP=t._$Ns;}}}}}}}else{aO._$RP=t._$Fr;aO._$4P=G.createString(aT,aV,aK-aV);}}aN.motions.push(aO);var aU=0;var aR=[];for(aJ=aK+1;aJ0){aR.push(aM);aU++;var aH=aI[0];if(aHaN._$yT){aN._$yT=aU;}}}}aN._$rr=((1000*aN._$yT)/aN._$D0)|0;return aN;};ao.prototype.getDurationMSec=function(){return this._$E?-1:this._$rr;};ao.prototype.getLoopDurationMSec=function(){return this._$rr;};ao.prototype.dump=function(){for(var aJ=0;aJ=aL?aL-1:aK)];aJ.setParamFloat(aT,aX);}else{if(t._$ws<=aV._$RP&&aV._$RP<=t._$Ys){}else{var aH=aJ.getParamIndex(aT);var a4=aJ.getModelContext();var aY=a4.getParamMax(aH);var aW=a4.getParamMin(aH);var aM=0.4;var aS=aM*(aY-aW);var aU=a4.getParamFloat(aH);var a2=aV._$I0[(aK>=aL?aL-1:aK)];var a1=aV._$I0[(aK+1>=aL?aL-1:aK+1)];var aI;if((a2aS)||(a2>a1&&a2-a1>aS)){aI=a2;}else{aI=a2+(a1-a2)*aR;}var aP=aU+(aI-aU)*aQ;aJ.setParamFloat(aT,aP);}}}if(aK>=this._$yT){if(this._$E){a3._$z2=aN;if(this.loopFadeIn){a3._$bs=aN;}}else{a3._$9L=true;}}this._$eP=aQ;};ao.prototype._$r0=function(){return this._$E;};ao.prototype._$aL=function(aH){this._$E=aH;};ao.prototype._$S0=function(){return this._$D0;};ao.prototype._$U0=function(aH){this._$D0=aH;};ao.prototype.isLoopFadeIn=function(){return this.loopFadeIn;};ao.prototype.setLoopFadeIn=function(aH){this.loopFadeIn=aH;};function aE(){this._$P=new Float32Array(100);this.size=0;}aE.prototype.clear=function(){this.size=0;};aE.prototype.add=function(aI){if(this._$P.length<=this.size){var aH=new Float32Array(this.size*2);P._$jT(this._$P,0,aH,0,this.size);this._$P=aH;}this._$P[this.size++]=aI;};aE.prototype._$BL=function(){var aH=new Float32Array(this.size);P._$jT(this._$P,0,aH,0,this.size);return aH;};function t(){this._$4P=null;this._$I0=null;this._$RP=null;}t._$Fr=0;t._$hs=1;t._$ws=100;t._$Ns=101;t._$xs=102;t._$us=103;t._$qs=104;t._$Ys=105;function E(){if(j){return;}c.prototype.constructor.call(this);this._$o=0;this._$A=0;this._$GS=null;this._$Eo=null;}E.prototype=new c();E._$gT=new Array();E.prototype._$zP=function(){this._$GS=new g();this._$GS._$zP();};E.prototype._$F0=function(aH){c.prototype._$F0.call(this,aH);this._$A=aH._$6L();this._$o=aH._$6L();this._$GS=aH._$nP();this._$Eo=aH._$nP();c.prototype.readV2_opacity.call(this,aH);};E.prototype.init=function(aH){var aI=new H(this);var aJ=(this._$o+1)*(this._$A+1);if(aI._$Cr!=null){aI._$Cr=null;}aI._$Cr=new Float32Array(aJ*2);if(aI._$hr!=null){aI._$hr=null;}if(this._$32()){aI._$hr=new Float32Array(aJ*2);}else{aI._$hr=null;}return aI;};E.prototype._$Nr=function(aJ,aI){var aK=aI;if(!this._$GS._$Ur(aJ)){return;}var aL=this._$VT();var aH=E._$gT;aH[0]=false;aG._$Vr(aJ,this._$GS,aH,aL,this._$Eo,aK._$Cr,0,2);aI._$Ib(aH[0]);this.interpolateOpacity(aJ,this._$GS,aI,aH);};E.prototype._$2b=function(aK,aJ){var aL=aJ;aL._$hS(true);if(!this._$32()){aL.setTotalOpacity(aL.getInterpolatedOpacity());}else{var aH=this.getTargetBaseDataID();if(aL._$8r==c._$ur){aL._$8r=aK.getBaseDataIndex(aH);}if(aL._$8r<0){if(Q._$so){q._$li("_$L _$0P _$G :: %s",aH);}aL._$hS(false);}else{var aN=aK.getBaseData(aL._$8r);var aI=aK._$q2(aL._$8r);if(aN!=null&&aI._$yo()){var aM=aI.getTotalScale();aL.setTotalScale_notForClient(aM);var aO=aI.getTotalOpacity();aL.setTotalOpacity(aO*aL.getInterpolatedOpacity());aN._$nb(aK,aI,aL._$Cr,aL._$hr,this._$VT(),0,2);aL._$hS(true);}else{aL._$hS(false);}}}};E.prototype._$nb=function(aL,aI,aH,aM,aO,aK,aJ){if(true){var aN=aI;var aP=(aN._$hr!=null)?aN._$hr:aN._$Cr;E.transformPoints_sdk2(aH,aM,aO,aK,aJ,aP,this._$o,this._$A);}else{this.transformPoints_sdk1(aL,aI,aH,aM,aO,aK,aJ);}};E.transformPoints_sdk2=function(a0,bc,a5,aP,aI,aR,aQ,aU){var aW=a5*aI;var aV;var bn,bm;var aT=0;var aS=0;var bl=0;var bk=0;var bf=0;var be=0;var aZ=false;for(var ba=aP;ba=1){var aK=aR[((0)+(aU)*a1)*2];var aJ=aR[((0)+(aU)*a1)*2+1];var aO=aT-2*bl+1*bf;var aN=aS-2*bk+1*be;var a3=aT+3*bf;var a2=aS+3*be;var a8=aT-2*bl+3*bf;var a6=aS-2*bk+3*be;var bj=0.5*(a4-(-2));var bi=0.5*(aX-(1));if(bj+bi<=1){bc[ba]=aO+(aK-aO)*bj+(a8-aO)*bi;bc[ba+1]=aN+(aJ-aN)*bj+(a6-aN)*bi;}else{bc[ba]=a3+(a8-a3)*(1-bj)+(aK-a3)*(1-bi);bc[ba+1]=a2+(a6-a2)*(1-bj)+(aJ-a2)*(1-bi);}}else{var aH=(a7|0);if(aH==aU){aH=aU-1;}var bj=0.5*(a4-(-2));var bi=a7-aH;var bb=aH/aU;var a9=(aH+1)/aU;var aK=aR[((0)+(aH)*a1)*2];var aJ=aR[((0)+(aH)*a1)*2+1];var a3=aR[((0)+(aH+1)*a1)*2];var a2=aR[((0)+(aH+1)*a1)*2+1];var aO=aT-2*bl+bb*bf;var aN=aS-2*bk+bb*be;var a8=aT-2*bl+a9*bf;var a6=aS-2*bk+a9*be;if(bj+bi<=1){bc[ba]=aO+(aK-aO)*bj+(a8-aO)*bi;bc[ba+1]=aN+(aJ-aN)*bj+(a6-aN)*bi;}else{bc[ba]=a3+(a8-a3)*(1-bj)+(aK-a3)*(1-bi);bc[ba+1]=a2+(a6-a2)*(1-bj)+(aJ-a2)*(1-bi);}}}}else{if(1<=a4){if(aX<=0){var a8=aR[((aQ)+(0)*a1)*2];var a6=aR[((aQ)+(0)*a1)*2+1];var a3=aT+3*bl;var a2=aS+3*bk;var aO=aT+1*bl-2*bf;var aN=aS+1*bk-2*be;var aK=aT+3*bl-2*bf;var aJ=aS+3*bk-2*be;var bj=0.5*(a4-(1));var bi=0.5*(aX-(-2));if(bj+bi<=1){bc[ba]=aO+(aK-aO)*bj+(a8-aO)*bi;bc[ba+1]=aN+(aJ-aN)*bj+(a6-aN)*bi;}else{bc[ba]=a3+(a8-a3)*(1-bj)+(aK-a3)*(1-bi);bc[ba+1]=a2+(a6-a2)*(1-bj)+(aJ-a2)*(1-bi);}}else{if(aX>=1){var aO=aR[((aQ)+(aU)*a1)*2];var aN=aR[((aQ)+(aU)*a1)*2+1];var aK=aT+3*bl+1*bf;var aJ=aS+3*bk+1*be;var a8=aT+1*bl+3*bf;var a6=aS+1*bk+3*be;var a3=aT+3*bl+3*bf;var a2=aS+3*bk+3*be;var bj=0.5*(a4-(1));var bi=0.5*(aX-(1));if(bj+bi<=1){bc[ba]=aO+(aK-aO)*bj+(a8-aO)*bi;bc[ba+1]=aN+(aJ-aN)*bj+(a6-aN)*bi;}else{bc[ba]=a3+(a8-a3)*(1-bj)+(aK-a3)*(1-bi);bc[ba+1]=a2+(a6-a2)*(1-bj)+(aJ-a2)*(1-bi);}}else{var aH=(a7|0);if(aH==aU){aH=aU-1;}var bj=0.5*(a4-(1));var bi=a7-aH;var bb=aH/aU;var a9=(aH+1)/aU;var aO=aR[((aQ)+(aH)*a1)*2];var aN=aR[((aQ)+(aH)*a1)*2+1];var a8=aR[((aQ)+(aH+1)*a1)*2];var a6=aR[((aQ)+(aH+1)*a1)*2+1];var aK=aT+3*bl+bb*bf;var aJ=aS+3*bk+bb*be;var a3=aT+3*bl+a9*bf;var a2=aS+3*bk+a9*be;if(bj+bi<=1){bc[ba]=aO+(aK-aO)*bj+(a8-aO)*bi;bc[ba+1]=aN+(aJ-aN)*bj+(a6-aN)*bi;}else{bc[ba]=a3+(a8-a3)*(1-bj)+(aK-a3)*(1-bi);bc[ba+1]=a2+(a6-a2)*(1-bj)+(aJ-a2)*(1-bi);}}}}else{if(aX<=0){var aY=(bd|0);if(aY==aQ){aY=aQ-1;}var bj=bd-aY;var bi=0.5*(aX-(-2));var bp=aY/aQ;var bo=(aY+1)/aQ;var a8=aR[((aY)+(0)*a1)*2];var a6=aR[((aY)+(0)*a1)*2+1];var a3=aR[((aY+1)+(0)*a1)*2];var a2=aR[((aY+1)+(0)*a1)*2+1];var aO=aT+bp*bl-2*bf;var aN=aS+bp*bk-2*be;var aK=aT+bo*bl-2*bf;var aJ=aS+bo*bk-2*be;if(bj+bi<=1){bc[ba]=aO+(aK-aO)*bj+(a8-aO)*bi;bc[ba+1]=aN+(aJ-aN)*bj+(a6-aN)*bi;}else{bc[ba]=a3+(a8-a3)*(1-bj)+(aK-a3)*(1-bi);bc[ba+1]=a2+(a6-a2)*(1-bj)+(aJ-a2)*(1-bi);}}else{if(aX>=1){var aY=(bd|0);if(aY==aQ){aY=aQ-1;}var bj=bd-aY;var bi=0.5*(aX-(1));var bp=aY/aQ;var bo=(aY+1)/aQ;var aO=aR[((aY)+(aU)*a1)*2];var aN=aR[((aY)+(aU)*a1)*2+1];var aK=aR[((aY+1)+(aU)*a1)*2];var aJ=aR[((aY+1)+(aU)*a1)*2+1];var a8=aT+bp*bl+3*bf;var a6=aS+bp*bk+3*be;var a3=aT+bo*bl+3*bf;var a2=aS+bo*bk+3*be;if(bj+bi<=1){bc[ba]=aO+(aK-aO)*bj+(a8-aO)*bi;bc[ba+1]=aN+(aJ-aN)*bj+(a6-aN)*bi;}else{bc[ba]=a3+(a8-a3)*(1-bj)+(aK-a3)*(1-bi);bc[ba+1]=a2+(a6-a2)*(1-bj)+(aJ-a2)*(1-bi);}}else{System.err.printf("_$li calc : %.4f , %.4f @@BDBoxGrid\n",a4,aX);}}}}}else{bc[ba]=aT+a4*bl+aX*bf;bc[ba+1]=aS+a4*bk+aX*be;}}else{bn=bd-(bd|0);bm=a7-(a7|0);aV=2*((bd|0)+((a7|0))*(aQ+1));if(bn+bm<1){bc[ba]=aR[aV]*(1-bn-bm)+aR[aV+2]*bn+aR[aV+2*(aQ+1)]*bm;bc[ba+1]=aR[aV+1]*(1-bn-bm)+aR[aV+3]*bn+aR[aV+2*(aQ+1)+1]*bm;}else{bc[ba]=aR[aV+2*(aQ+1)+2]*(bn-1+bm)+aR[aV+2*(aQ+1)]*(1-bn)+aR[aV+2]*(1-bm);bc[ba+1]=aR[aV+2*(aQ+1)+3]*(bn-1+bm)+aR[aV+2*(aQ+1)+1]*(1-bn)+aR[aV+3]*(1-bm);}}}};E.prototype.transformPoints_sdk1=function(aJ,aR,aL,a0,aU,aP,aZ){var aH=aR;var aO,aN;var aM=this._$o;var aQ=this._$A;var aI=aU*aZ;var aS,aY;var aV;var aX,aW;var aT=(aH._$hr!=null)?aH._$hr:aH._$Cr;for(var aK=aP;aK1){aO=1;}}if(aN<0){aN=0;}else{if(aN>1){aN=1;}}aO*=aM;aN*=aQ;aS=(aO|0);aY=(aN|0);if(aS>aM-1){aS=aM-1;}if(aY>aQ-1){aY=aQ-1;}aX=aO-aS;aW=aN-aY;aV=2*(aS+aY*(aM+1));}else{aO=aL[aK]*aM;aN=aL[aK+1]*aQ;aX=aO-(aO|0);aW=aN-(aN|0);aV=2*((aO|0)+(aN|0)*(aM+1));}if(aX+aW<1){a0[aK]=aT[aV]*(1-aX-aW)+aT[aV+2]*aX+aT[aV+2*(aM+1)]*aW;a0[aK+1]=aT[aV+1]*(1-aX-aW)+aT[aV+3]*aX+aT[aV+2*(aM+1)+1]*aW;}else{a0[aK]=aT[aV+2*(aM+1)+2]*(aX-1+aW)+aT[aV+2*(aM+1)]*(1-aX)+aT[aV+2]*(1-aW);a0[aK+1]=aT[aV+2*(aM+1)+3]*(aX-1+aW)+aT[aV+2*(aM+1)+1]*(1-aX)+aT[aV+3]*(1-aW);}}};E.prototype._$VT=function(){return(this._$o+1)*(this._$A+1);};E.prototype.getType=function(){return c._$_b;};function H(aH){B.prototype.constructor.call(this,aH);this._$8r=c._$ur;this._$Cr=null;this._$hr=null;}H.prototype=new B();function s(){if(j){return;}this.visible=true;this._$g0=false;this._$NL=null;this._$3S=null;this._$aS=null;s._$42++;}s._$42=0;s.prototype._$zP=function(){this._$3S=new Array();this._$aS=new Array();};s.prototype._$F0=function(aH){this._$g0=aH._$8L();this.visible=aH._$8L();this._$NL=aH._$nP();this._$3S=aH._$nP();this._$aS=aH._$nP();};s.prototype.init=function(aI){var aH=new aj(this);aH.setPartsOpacity(this.isVisible()?1:0);return aH;};s.prototype._$6o=function(aH){if(this._$3S==null){throw new Error("_$3S _$6 _$Wo@_$6o");}this._$3S.push(aH);};s.prototype._$3o=function(aH){if(this._$aS==null){throw new Error("_$aS _$6 _$Wo@_$3o");}this._$aS.push(aH);};s.prototype._$Zo=function(aH){this._$3S=aH;};s.prototype._$xo=function(aH){this._$aS=aH;};s.prototype.isVisible=function(){return this.visible;};s.prototype._$uL=function(){return this._$g0;};s.prototype._$KP=function(aH){this.visible=aH;};s.prototype._$ET=function(aH){this._$g0=aH;};s.prototype.getBaseData=function(){return this._$3S;};s.prototype.getDrawData=function(){return this._$aS;};s.prototype._$p2=function(){return this._$NL;};s.prototype._$ob=function(aH){this._$NL=aH;};s.prototype.getPartsID=function(){return this._$NL;};s.prototype._$MP=function(aH){this._$NL=aH;};function aj(aH){this._$VS=null;this._$e0=null;this._$e0=aH;}aj.prototype=new S();aj.prototype.getPartsOpacity=function(){return this._$VS;};aj.prototype.setPartsOpacity=function(aH){this._$VS=aH;};function ak(aH){if(j){return;}this.id=aH;}ak._$L7=function(){z._$27();n._$27();Z._$27();i._$27();};ak.prototype.toString=function(){return this.id;};function D(){}D.prototype._$F0=function(aH){};function an(){if(j){return;}this._$4S=null;}an.prototype._$1s=function(){return this._$4S;};an.prototype._$zP=function(){this._$4S=new Array();};an.prototype._$F0=function(aH){this._$4S=aH._$nP();};an.prototype._$Ks=function(aH){this._$4S.push(aH);};function au(aH,aI){this.canvas=aH;this.context=aI;this.viewport=new Array(0,0,aH.width,aH.height);this._$6r=1;this._$xP=0;this._$3r=1;this._$uP=0;this._$Qo=-1;this.cacheImages={};}au.tr=new am();au._$50=new am();au._$Ti=new Array(0,0);au._$Pi=new Array(0,0);au._$B=new Array(0,0);au.prototype._$lP=function(aI,aK,aJ,aH){this.viewport=new Array(aI,aK,aJ,aH);};au.prototype._$bL=function(){this.context.save();var aH=this.viewport;if(aH!=null){this.context.beginPath();this.context._$Li(aH[0],aH[1],aH[2],aH[3]);this.context.clip();}};au.prototype._$ei=function(){this.context.restore();};au.prototype.drawElements=function(bc,bm,aX,aJ,bA,aM,bl,bz){try{if(bA!=this._$Qo){this._$Qo=bA;this.context.globalAlpha=bA;}var a2=bm.length;var aP=bc.width;var a5=bc.height;var bE=this.context;var a7=this._$xP;var a6=this._$uP;var a1=this._$6r;var aZ=this._$3r;var bD=au.tr;var aI=au._$Ti;var aH=au._$Pi;var bu=au._$B;for(var by=0;by0.02){au.expandClip(aK,aJ,aV,aI,aO,aN,aH,aW,aS,aR);}else{au.clipWithTransform(aK,null,aM,aL,aU,aT,aQ,aP);}};au.expandClip=function(aV,bg,aK,a3,aJ,aI,be,ba,aZ,aX){var aP=be-aJ;var aO=ba-aI;var bi=aZ-aJ;var bh=aX-aI;var bj=aP*bh-aO*bi>0?aK:-aK;var aL=-aO;var aH=aP;var bc=aZ-be;var a8=aX-ba;var a7=-a8;var a6=bc;var aQ=Math.sqrt(bc*bc+a8*a8);var bf=-bh;var bb=bi;var a2=Math.sqrt(bi*bi+bh*bh);var bd=aJ-bj*aL/a3;var a9=aI-bj*aH/a3;var aY=be-bj*aL/a3;var aW=ba-bj*aH/a3;var a5=be-bj*a7/aQ;var a4=ba-bj*a6/aQ;var aS=aZ-bj*a7/aQ;var aR=aX-bj*a6/aQ;var aN=aJ+bj*bf/a2;var aM=aI+bj*bb/a2;var a1=aZ+bj*bf/a2;var a0=aX+bj*bb/a2;var aU=au._$50;var aT=bg._$P2(aU);if(aT==null){return false;}au.clipWithTransform(aV,aU,bd,a9,aY,aW,a5,a4,aS,aR,a1,a0,aN,aM);return true;};au.clipWithTransform=function(aH,aI,aS,aN,aQ,aK,aP,aJ){if(arguments.length<(1+3*2)){q._$li("err : @LDGL.clip()");return;}if(!(arguments[1] instanceof am)){q._$li("err : a[0] is _$6 LDTransform @LDGL.clip()");return;}var aM=au._$B;var aO=aI;var aR=arguments;aH.beginPath();if(aO){aO._$PS(aR[2],aR[3],aM);aH.moveTo(aM[0],aM[1]);for(var aL=4;aL1){return 1;}}return(0.5-0.5*Math.cos(aH*aC.PI_F));};function J(aH){if(j){return;}this._$ib=aH;}J._$fr=-1;J.prototype.toString=function(){return this._$ib;};function b(){if(j){return;}a.prototype.constructor.call(this);this._$LP=-1;this._$d0=0;this._$Yo=0;this._$JP=null;this._$5P=null;this._$BP=null;this._$Eo=null;this._$Qi=null;this._$6s=b._$ms;this.culling=true;this.gl_cacheImage=null;this.instanceNo=b._$42++;}b.prototype=new a();b._$42=0;b._$Os=30;b._$ms=0;b._$ns=1;b._$_s=2;b._$gT=new Array();b.prototype._$_S=function(aH){this._$LP=aH;};b.prototype.getTextureNo=function(){return this._$LP;};b.prototype._$ZL=function(){return this._$Qi;};b.prototype._$H2=function(){return this._$JP;};b.prototype.getNumPoints=function(){return this._$d0;};b.prototype.getType=function(){return a._$wb;};b.prototype._$B2=function(aL,aH,aO){var aM=aH;var aN=(aM._$hr!=null)?aM._$hr:aM._$Cr;var aK=aw._$do;switch(aK){default:case aw._$Ms:throw new Error("_$L _$ro ");case aw._$Qs:for(var aJ=this._$d0-1;aJ>=0;--aJ){var aI=aJ*aw._$No;aN[aI+4]=aO;}break;}};b.prototype._$zP=function(){this._$GS=new g();this._$GS._$zP();};b.prototype._$F0=function(aK){a.prototype._$F0.call(this,aK);this._$LP=aK._$6L();this._$d0=aK._$6L();this._$Yo=aK._$6L();var aH=aK._$nP();this._$BP=new Int16Array(this._$Yo*3);for(var aJ=this._$Yo*3-1;aJ>=0;--aJ){this._$BP[aJ]=aH[aJ];}this._$Eo=aK._$nP();this._$Qi=aK._$nP();if(aK.getFormatVersion()>=ay._$s7){this._$JP=aK._$6L();if(this._$JP!=0){if((this._$JP&1)!=0){var aI=aK._$6L();if(this._$5P==null){this._$5P=new Object();}this._$5P._$Hb=parseInt(aI);}if((this._$JP&b._$Os)!=0){this._$6s=(this._$JP&b._$Os)>>1;}else{this._$6s=b._$ms;}if((this._$JP&32)!=0){this.culling=false;}}}else{this._$JP=0;}};b.prototype.init=function(aL){var aN=new ag(this);var aI=this._$d0*aw._$No;var aH=this._$32();if(aN._$Cr!=null){aN._$Cr=null;}aN._$Cr=new Float32Array(aI);if(aN._$hr!=null){aN._$hr=null;}aN._$hr=aH?new Float32Array(aI):null;var aM=aw._$do;switch(aM){default:case aw._$Ms:if(aw._$Ls){for(var aJ=this._$d0-1;aJ>=0;--aJ){var aO=aJ<<1;this._$Qi[aO+1]=1-this._$Qi[aO+1];}}break;case aw._$Qs:for(var aJ=this._$d0-1;aJ>=0;--aJ){var aO=aJ<<1;var aK=aJ*aw._$No;var aQ=this._$Qi[aO];var aP=this._$Qi[aO+1];aN._$Cr[aK]=aQ;aN._$Cr[aK+1]=aP;aN._$Cr[aK+4]=0;if(aH){aN._$hr[aK]=aQ;aN._$hr[aK+1]=aP;aN._$hr[aK+4]=0;}}break;}return aN;};b.prototype._$Nr=function(aJ,aH){var aK=aH;if(!((this==aK._$GT()))){console.log("### assert!! ### ");}if(!this._$GS._$Ur(aJ)){return;}a.prototype._$Nr.call(this,aJ,aK);if(aK._$IS[0]){return;}var aI=b._$gT;aI[0]=false;aG._$Vr(aJ,this._$GS,aI,this._$d0,this._$Eo,aK._$Cr,aw._$i2,aw._$No);};b.prototype._$2b=function(aK,aI){try{if(!((this==aI._$GT()))){console.log("### assert!! ### ");}var aL=false;if(aI._$IS[0]){aL=true;}var aM=aI;if(!aL){a.prototype._$2b.call(this,aK);if(this._$32()){var aH=this.getTargetBaseDataID();if(aM._$8r==a._$ur){aM._$8r=aK.getBaseDataIndex(aH);}if(aM._$8r<0){if(Q._$so){q._$li("_$L _$0P _$G :: %s",aH);}}else{var aO=aK.getBaseData(aM._$8r);var aJ=aK._$q2(aM._$8r);if(aO!=null&&!aJ._$x2()){aO._$nb(aK,aJ,aM._$Cr,aM._$hr,this._$d0,aw._$i2,aw._$No);aM._$AT=true;}else{aM._$AT=false;}aM.baseOpacity=aJ.getTotalOpacity();}}}}catch(aN){throw aN;}};b.prototype.draw=function(aN,aK,aI){if(!((this==aI._$GT()))){console.log("### assert!! ### ");}if(aI._$IS[0]){return;}var aL=aI;var aJ=this._$LP;if(aJ<0){aJ=1;}var aH=this.getOpacity(aK,aL)*aI._$VS*aI.baseOpacity;var aM=(aL._$hr!=null)?aL._$hr:aL._$Cr;aN.setClipBufPre_clipContextForDraw(aI.clipBufPre_clipContext);aN._$WP(this.culling);aN._$Uo(aJ,3*this._$Yo,this._$BP,aM,this._$Qi,aH,this._$6s,aL);};b.prototype.dump=function(){console.log(" _$yi( %d ) , _$d0( %d ) , _$Yo( %d ) \n",this._$LP,this._$d0,this._$Yo);console.log(" _$Oi _$di = { ");for(var aJ=0;aJstartMotion() / start _$K _$3 (m%d)\n",aH,aL._$sr);}}if(aJ==null){return -1;}aL=new M();aL._$w0=aJ;this.motions.push(aL);var aN=aL._$sr;if(this._$eb){q._$Ji("MotionQueueManager[size:%2d]->startMotion() / new _$w0 (m%d)\n",aH,aN);}return aN;};V.prototype.updateParam=function(aJ){try{var aI=false;for(var aK=0;aKupdateParam() / _$T0 _$w0 (m%d)\n",this.motions.length-1,aL._$sr);}this.motions.splice(aK,1);aK--;}else{}}return aI;}catch(aM){q._$li(aM);return true;}};V.prototype.isFinished=function(aK){if(arguments.length>=1){for(var aI=0;aI0.9?Q.EXPAND_W:0;var a0=this.gl;if(this.gl==null){throw new Error("gl is null");}var a1=false;var aQ=1;var aP=1;var a3=1;var aZ=1;var aW=this._$C0*aP*aN;var a2=this._$tT*a3*aN;var a5=this._$WL*aZ*aN;var a7=this._$lT*aN;if(this.clipBufPre_clipContextMask!=null){a0.frontFace(a0.CCW);a0.useProgram(this.shaderProgram);this._$vS=T(a0,this._$vS,aU);this._$no=L(a0,this._$no,aL);a0.enableVertexAttribArray(this.a_position_Loc);a0.vertexAttribPointer(this.a_position_Loc,2,a0.FLOAT,false,0,0);this._$NT=T(a0,this._$NT,aV);a0.activeTexture(a0.TEXTURE1);a0.bindTexture(a0.TEXTURE_2D,this.textures[aS]);a0.uniform1i(this.s_texture0_Loc,1);a0.enableVertexAttribArray(this.a_texCoord_Loc);a0.vertexAttribPointer(this.a_texCoord_Loc,2,a0.FLOAT,false,0,0);a0.uniformMatrix4fv(this.u_matrix_Loc,false,this.getClipBufPre_clipContextMask().matrixForMask);var aY=this.getClipBufPre_clipContextMask().layoutChannelNo;var a4=this.getChannelFlagAsColor(aY);a0.uniform4f(this.u_channelFlag,a4.r,a4.g,a4.b,a4.a);var aI=this.getClipBufPre_clipContextMask().layoutBounds;a0.uniform4f(this.u_baseColor_Loc,aI.x*2-1,aI.y*2-1,aI._$EL()*2-1,aI._$5T()*2-1);a0.uniform1i(this.u_maskFlag_Loc,true);}else{a1=this.getClipBufPre_clipContextDraw()!=null;if(a1){a0.useProgram(this.shaderProgramOff);this._$vS=T(a0,this._$vS,aU);this._$no=L(a0,this._$no,aL);a0.enableVertexAttribArray(this.a_position_Loc_Off);a0.vertexAttribPointer(this.a_position_Loc_Off,2,a0.FLOAT,false,0,0);this._$NT=T(a0,this._$NT,aV);a0.activeTexture(a0.TEXTURE1);a0.bindTexture(a0.TEXTURE_2D,this.textures[aS]);a0.uniform1i(this.s_texture0_Loc_Off,1);a0.enableVertexAttribArray(this.a_texCoord_Loc_Off);a0.vertexAttribPointer(this.a_texCoord_Loc_Off,2,a0.FLOAT,false,0,0);a0.uniformMatrix4fv(this.u_clipMatrix_Loc_Off,false,this.getClipBufPre_clipContextDraw().matrixForDraw);a0.uniformMatrix4fv(this.u_matrix_Loc_Off,false,this.matrix4x4);a0.activeTexture(a0.TEXTURE2);a0.bindTexture(a0.TEXTURE_2D,Q.fTexture[this.glno]);a0.uniform1i(this.s_texture1_Loc_Off,2);var aY=this.getClipBufPre_clipContextDraw().layoutChannelNo;var a4=this.getChannelFlagAsColor(aY);a0.uniform4f(this.u_channelFlag_Loc_Off,a4.r,a4.g,a4.b,a4.a);a0.uniform4f(this.u_baseColor_Loc_Off,aW,a2,a5,a7);}else{a0.useProgram(this.shaderProgram);this._$vS=T(a0,this._$vS,aU);this._$no=L(a0,this._$no,aL);a0.enableVertexAttribArray(this.a_position_Loc);a0.vertexAttribPointer(this.a_position_Loc,2,a0.FLOAT,false,0,0);this._$NT=T(a0,this._$NT,aV);a0.activeTexture(a0.TEXTURE1);a0.bindTexture(a0.TEXTURE_2D,this.textures[aS]);a0.uniform1i(this.s_texture0_Loc,1);a0.enableVertexAttribArray(this.a_texCoord_Loc);a0.vertexAttribPointer(this.a_texCoord_Loc,2,a0.FLOAT,false,0,0);a0.uniformMatrix4fv(this.u_matrix_Loc,false,this.matrix4x4);a0.uniform4f(this.u_baseColor_Loc,aW,a2,a5,a7);a0.uniform1i(this.u_maskFlag_Loc,false);}}if(this.culling){this.gl.enable(a0.CULL_FACE);}else{this.gl.disable(a0.CULL_FACE);}this.gl.enable(a0.BLEND);var a6;var aX;var aR;var aK;if(this.clipBufPre_clipContextMask!=null){a6=a0.ONE;aX=a0.ONE_MINUS_SRC_ALPHA;aR=a0.ONE;aK=a0.ONE_MINUS_SRC_ALPHA;}else{switch(aM){case b._$ms:a6=a0.ONE;aX=a0.ONE_MINUS_SRC_ALPHA;aR=a0.ONE;aK=a0.ONE_MINUS_SRC_ALPHA;break;case b._$ns:a6=a0.ONE;aX=a0.ONE;aR=a0.ZERO;aK=a0.ONE;break;case b._$_s:a6=a0.DST_COLOR;aX=a0.ONE_MINUS_SRC_ALPHA;aR=a0.ZERO;aK=a0.ONE;break;}}a0.blendEquationSeparate(a0.FUNC_ADD,a0.FUNC_ADD);a0.blendFuncSeparate(a6,aX,aR,aK);if(this.anisotropyExt){a0.texParameteri(a0.TEXTURE_2D,this.anisotropyExt.TEXTURE_MAX_ANISOTROPY_EXT,this.maxAnisotropy);}var aJ=aL.length;a0.drawElements(a0.TRIANGLES,aJ,a0.UNSIGNED_SHORT,0);a0.bindTexture(a0.TEXTURE_2D,null);};function T(aJ,aH,aI){if(aH==null){aH=aJ.createBuffer();}aJ.bindBuffer(aJ.ARRAY_BUFFER,aH);aJ.bufferData(aJ.ARRAY_BUFFER,aI,aJ.DYNAMIC_DRAW);return aH;}function L(aJ,aH,aI){if(aH==null){aH=aJ.createBuffer();}aJ.bindBuffer(aJ.ELEMENT_ARRAY_BUFFER,aH);aJ.bufferData(aJ.ELEMENT_ARRAY_BUFFER,aI,aJ.DYNAMIC_DRAW);return aH;}C.prototype._$Rs=function(){throw new Error("_$Rs");};C.prototype._$Ds=function(aH){throw new Error("_$Ds");};C.prototype._$K2=function(){for(var aH=0;aH=48){var aL=ay._$9o(aN);if(aL!=null){aL._$F0(this);return aL;}else{return null;}}switch(aN){case 1:return this._$bT();case 10:var aM=this._$6L();return new I(aM,true);case 11:return new av(this._$mP(),this._$mP(),this._$mP(),this._$mP());case 12:return new av(this._$_T(),this._$_T(),this._$_T(),this._$_T());case 13:return new e(this._$mP(),this._$mP());case 14:return new e(this._$_T(),this._$_T());case 15:var aH=this._$3L();var aI=new Array(aH);for(var aJ=0;aJ>(7-this._$hL++))&1)==1;};K.prototype._$zT=function(){if(this._$hL!=0){this._$hL=0;}};function ai(){}ai.prototype._$wP=function(aM,aI,aK){for(var aL=0;aLMath.PI){aJ-=2*Math.PI;}return aJ;};aC._$9=function(aH){return Math.sin(aH);};aC.fcos=function(aH){return Math.cos(aH);};function aB(aH){if(j){return;}this._$e0=null;this._$IP=null;this._$Us=null;this._$7s=null;this._$IS=[false];this._$VS=null;this._$AT=true;this.baseOpacity=1;this.clipBufPre_clipContext=null;this._$e0=aH;}aB.prototype._$u2=function(){return this._$IS[0];};aB.prototype._$yo=function(){return this._$AT&&!this._$IS[0];};aB.prototype._$GT=function(){return this._$e0;};function r(){}r._$W2=0;r.SYSTEM_INFO=null;r.USER_AGENT=navigator.userAgent;r.isIPhone=function(){if(!r.SYSTEM_INFO){r.setup();}return r.SYSTEM_INFO._isIPhone;};r.isIOS=function(){if(!r.SYSTEM_INFO){r.setup();}return r.SYSTEM_INFO._isIPhone||r.SYSTEM_INFO._isIPad;};r.isAndroid=function(){if(!r.SYSTEM_INFO){r.setup();}return r.SYSTEM_INFO._isAndroid;};r.getOSVersion=function(){if(!r.SYSTEM_INFO){r.setup();}return r.SYSTEM_INFO.version;};r.getOS=function(){if(!r.SYSTEM_INFO){r.setup();}if(r.SYSTEM_INFO._isIPhone||r.SYSTEM_INFO._isIPad){return"iOS";}if(r.SYSTEM_INFO._isAndroid){return"Android";}else{return"_$Q0 OS";}};r.setup=function(){var aK=r.USER_AGENT;function aI(aO,aR){var aN=aO.substring(aR).split(/[ _,;\.]/);var aQ=0;for(var aM=0;aM<=2;aM++){if(isNaN(aN[aM])){break;}var aP=parseInt(aN[aM]);if(aP<0||aP>999){q._$li("err : "+aP+" @UtHtml5.setup()");aQ=0;break;}aQ+=aP*Math.pow(1000,(2-aM));}return aQ;}var aL;var aH;var aJ=r.SYSTEM_INFO={userAgent:aK};if((aL=aK.indexOf("iPhone OS "))>=0){aJ.os="iPhone";aJ._isIPhone=true;aJ.version=aI(aK,aL+"iPhone OS ".length);}else{if((aL=aK.indexOf("iPad"))>=0){aL=aK.indexOf("CPU OS");if(aL<0){q._$li(" err : "+aK+" @UtHtml5.setup()");return;}aJ.os="iPad";aJ._isIPad=true;aJ.version=aI(aK,aL+"CPU OS ".length);}else{if((aL=aK.indexOf("Android"))>=0){aJ.os="Android";aJ._isAndroid=true;aJ.version=aI(aK,aL+"Android ".length);}else{aJ.os="-";aJ.version=-1;}}}};window.UtSystem=P;window.UtDebug=q;window.LDTransform=am;window.LDGL=au;window.Live2D=Q;window.Live2DModelWebGL=l;window.Live2DModelJS=v;window.Live2DMotion=ao;window.MotionQueueManager=V;window.PhysicsHair=u;window.AMotion=ah;window.PartsDataID=i;window.DrawDataID=Z;window.BaseDataID=n;window.ParamID=z;Q.init();var j=false;})(); \ No newline at end of file diff --git a/packages/live2d/src/libs/live2dcubismcore.min.js b/packages/live2d/src/libs/live2dcubismcore.min.js new file mode 100644 index 0000000..036b654 --- /dev/null +++ b/packages/live2d/src/libs/live2dcubismcore.min.js @@ -0,0 +1,9 @@ +/** + * Live2D Cubism Core + * (C) 2019 Live2D Inc. All rights reserved. + * + * This file is licensed pursuant to the license agreement below. + * This file corresponds to the "Redistributable Code" in the agreement. + * https://www.live2d.com/eula/live2d-proprietary-software-license-agreement_en.html + */ +var Live2DCubismCore;!function(Live2DCubismCore){var _scriptDir,_csm=function(){function _csm(){}return _csm.getVersion=function(){return _em.ccall("csmGetVersion","number",[],[])},_csm.getLatestMocVersion=function(){return _em.ccall("csmGetLatestMocVersion","number",[],[])},_csm.getMocVersion=function(moc,mocSize){return _em.ccall("csmGetMocVersion","number",["number","number"],[moc,mocSize])},_csm.getLogFunction=function(){return _em.ccall("csmGetLogFunction","number",[],[])},_csm.getSizeofModel=function(moc){return _em.ccall("csmGetSizeofModel","number",["number"],[moc])},_csm.reviveMocInPlace=function(memory,mocSize){return _em.ccall("csmReviveMocInPlace","number",["number","number"],[memory,mocSize])},_csm.initializeModelInPlace=function(moc,memory,modelSize){return _em.ccall("csmInitializeModelInPlace","number",["number","number","number"],[moc,memory,modelSize])},_csm.hasMocConsistency=function(memory,mocSize){return _em.ccall("csmHasMocConsistency","number",["number","number"],[memory,mocSize])},_csm.getParameterCount=function(model){return _em.ccall("csmGetParameterCount","number",["number"],[model])},_csm.getParameterIds=function(model){return _em.ccall("csmGetParameterIds","number",["number"],[model])},_csm.getParameterMinimumValues=function(model){return _em.ccall("csmGetParameterMinimumValues","number",["number"],[model])},_csm.getParameterTypes=function(model){return _em.ccall("csmGetParameterTypes","number",["number"],[model])},_csm.getParameterMaximumValues=function(model){return _em.ccall("csmGetParameterMaximumValues","number",["number"],[model])},_csm.getParameterDefaultValues=function(model){return _em.ccall("csmGetParameterDefaultValues","number",["number"],[model])},_csm.getParameterValues=function(model){return _em.ccall("csmGetParameterValues","number",["number"],[model])},_csm.getParameterKeyCounts=function(model){return _em.ccall("csmGetParameterKeyCounts","number",["number"],[model])},_csm.getParameterKeyValues=function(model){return _em.ccall("csmGetParameterKeyValues","number",["number"],[model])},_csm.getPartCount=function(model){return _em.ccall("csmGetPartCount","number",["number"],[model])},_csm.getPartIds=function(model){return _em.ccall("csmGetPartIds","number",["number"],[model])},_csm.getPartOpacities=function(model){return _em.ccall("csmGetPartOpacities","number",["number"],[model])},_csm.getPartParentPartIndices=function(model){return _em.ccall("csmGetPartParentPartIndices","number",["number"],[model])},_csm.getDrawableCount=function(model){return _em.ccall("csmGetDrawableCount","number",["number"],[model])},_csm.getDrawableIds=function(model){return _em.ccall("csmGetDrawableIds","number",["number"],[model])},_csm.getDrawableConstantFlags=function(model){return _em.ccall("csmGetDrawableConstantFlags","number",["number"],[model])},_csm.getDrawableDynamicFlags=function(model){return _em.ccall("csmGetDrawableDynamicFlags","number",["number"],[model])},_csm.getDrawableTextureIndices=function(model){return _em.ccall("csmGetDrawableTextureIndices","number",["number"],[model])},_csm.getDrawableDrawOrders=function(model){return _em.ccall("csmGetDrawableDrawOrders","number",["number"],[model])},_csm.getDrawableRenderOrders=function(model){return _em.ccall("csmGetDrawableRenderOrders","number",["number"],[model])},_csm.getDrawableOpacities=function(model){return _em.ccall("csmGetDrawableOpacities","number",["number"],[model])},_csm.getDrawableMaskCounts=function(model){return _em.ccall("csmGetDrawableMaskCounts","number",["number"],[model])},_csm.getDrawableMasks=function(model){return _em.ccall("csmGetDrawableMasks","number",["number"],[model])},_csm.getDrawableVertexCounts=function(model){return _em.ccall("csmGetDrawableVertexCounts","number",["number"],[model])},_csm.getDrawableVertexPositions=function(model){return _em.ccall("csmGetDrawableVertexPositions","number",["number"],[model])},_csm.getDrawableVertexUvs=function(model){return _em.ccall("csmGetDrawableVertexUvs","number",["number"],[model])},_csm.getDrawableIndexCounts=function(model){return _em.ccall("csmGetDrawableIndexCounts","number",["number"],[model])},_csm.getDrawableIndices=function(model){return _em.ccall("csmGetDrawableIndices","number",["number"],[model])},_csm.getDrawableMultiplyColors=function(model){return _em.ccall("csmGetDrawableMultiplyColors","number",["number"],[model])},_csm.getDrawableScreenColors=function(model){return _em.ccall("csmGetDrawableScreenColors","number",["number"],[model])},_csm.getDrawableParentPartIndices=function(model){return _em.ccall("csmGetDrawableParentPartIndices","number",["number"],[model])},_csm.mallocMoc=function(mocSize){return _em.ccall("csmMallocMoc","number",["number"],[mocSize])},_csm.mallocModelAndInitialize=function(moc){return _em.ccall("csmMallocModelAndInitialize","number",["number"],[moc])},_csm.malloc=function(size){return _em.ccall("csmMalloc","number",["number"],[size])},_csm.setLogFunction=function(handler){_em.ccall("csmSetLogFunction",null,["number"],[handler])},_csm.updateModel=function(model){_em.ccall("csmUpdateModel",null,["number"],[model])},_csm.readCanvasInfo=function(model,outSizeInPixels,outOriginInPixels,outPixelsPerUnit){_em.ccall("csmReadCanvasInfo",null,["number","number","number","number"],[model,outSizeInPixels,outOriginInPixels,outPixelsPerUnit])},_csm.resetDrawableDynamicFlags=function(model){_em.ccall("csmResetDrawableDynamicFlags",null,["number"],[model])},_csm.free=function(memory){_em.ccall("csmFree",null,["number"],[memory])},_csm.initializeAmountOfMemory=function(size){_em.ccall("csmInitializeAmountOfMemory",null,["number"],[size])},_csm}(),Version=(Live2DCubismCore.AlignofMoc=64,Live2DCubismCore.AlignofModel=16,Live2DCubismCore.MocVersion_Unknown=0,Live2DCubismCore.MocVersion_30=1,Live2DCubismCore.MocVersion_33=2,Live2DCubismCore.MocVersion_40=3,Live2DCubismCore.MocVersion_42=4,Live2DCubismCore.MocVersion_50=5,Live2DCubismCore.ParameterType_Normal=0,Live2DCubismCore.ParameterType_BlendShape=1,function(){function Version(){}return Version.csmGetVersion=function(){return _csm.getVersion()},Version.csmGetLatestMocVersion=function(){return _csm.getLatestMocVersion()},Version.csmGetMocVersion=function(moc,mocBytes){return _csm.getMocVersion(moc._ptr,mocBytes.byteLength)},Version}()),Version=(Live2DCubismCore.Version=Version,function(){function Logging(){}return Logging.csmSetLogFunction=function(handler){Logging.logFunction=handler;handler=_em.addFunction(Logging.wrapLogFunction,"vi");_csm.setLogFunction(handler)},Logging.csmGetLogFunction=function(){return Logging.logFunction},Logging.wrapLogFunction=function(messagePtr){messagePtr=_em.UTF8ToString(messagePtr);Logging.logFunction(messagePtr)},Logging}()),Version=(Live2DCubismCore.Logging=Version,function(){function Moc(mocBytes){var memory=_csm.mallocMoc(mocBytes.byteLength);memory&&(new Uint8Array(_em.HEAPU8.buffer,memory,mocBytes.byteLength).set(new Uint8Array(mocBytes)),this._ptr=_csm.reviveMocInPlace(memory,mocBytes.byteLength),this._ptr||_csm.free(memory))}return Moc.prototype.hasMocConsistency=function(mocBytes){var memory=_csm.mallocMoc(mocBytes.byteLength);if(memory)return new Uint8Array(_em.HEAPU8.buffer,memory,mocBytes.byteLength).set(new Uint8Array(mocBytes)),mocBytes=_csm.hasMocConsistency(memory,mocBytes.byteLength),_csm.free(memory),mocBytes},Moc.fromArrayBuffer=function(buffer){return buffer&&(buffer=new Moc(buffer))._ptr?buffer:null},Moc.prototype._release=function(){_csm.free(this._ptr),this._ptr=0},Moc}()),Version=(Live2DCubismCore.Moc=Version,function(){function Model(moc){this._ptr=_csm.mallocModelAndInitialize(moc._ptr),this._ptr&&(this.parameters=new Parameters(this._ptr),this.parts=new Parts(this._ptr),this.drawables=new Drawables(this._ptr),this.canvasinfo=new CanvasInfo(this._ptr))}return Model.fromMoc=function(moc){moc=new Model(moc);return moc._ptr?moc:null},Model.prototype.update=function(){_csm.updateModel(this._ptr)},Model.prototype.release=function(){_csm.free(this._ptr),this._ptr=0},Model}()),CanvasInfo=(Live2DCubismCore.Model=Version,function(modelPtr){var _canvasSize_data,_canvasSize_dataPtr,_canvasSize_nDataBytes,_canvasOrigin_dataPtr,_canvasOrigin_nDataBytes,_canvasPPU_nDataBytes,_canvasPPU_dataPtr;modelPtr&&(_canvasSize_nDataBytes=(_canvasSize_data=new Float32Array(2)).length*_canvasSize_data.BYTES_PER_ELEMENT,_canvasSize_dataPtr=_csm.malloc(_canvasSize_nDataBytes),(_canvasSize_dataPtr=new Uint8Array(_em.HEAPU8.buffer,_canvasSize_dataPtr,_canvasSize_nDataBytes)).set(new Uint8Array(_canvasSize_data.buffer)),_canvasOrigin_nDataBytes=(_canvasSize_nDataBytes=new Float32Array(2)).length*_canvasSize_nDataBytes.BYTES_PER_ELEMENT,_canvasOrigin_dataPtr=_csm.malloc(_canvasOrigin_nDataBytes),(_canvasOrigin_dataPtr=new Uint8Array(_em.HEAPU8.buffer,_canvasOrigin_dataPtr,_canvasOrigin_nDataBytes)).set(new Uint8Array(_canvasSize_nDataBytes.buffer)),_canvasPPU_nDataBytes=(_canvasOrigin_nDataBytes=new Float32Array(1)).length*_canvasOrigin_nDataBytes.BYTES_PER_ELEMENT,_canvasPPU_dataPtr=_csm.malloc(_canvasPPU_nDataBytes),(_canvasPPU_dataPtr=new Uint8Array(_em.HEAPU8.buffer,_canvasPPU_dataPtr,_canvasPPU_nDataBytes)).set(new Uint8Array(_canvasOrigin_nDataBytes.buffer)),_csm.readCanvasInfo(modelPtr,_canvasSize_dataPtr.byteOffset,_canvasOrigin_dataPtr.byteOffset,_canvasPPU_dataPtr.byteOffset),_canvasSize_data=new Float32Array(_canvasSize_dataPtr.buffer,_canvasSize_dataPtr.byteOffset,_canvasSize_dataPtr.length),_canvasSize_nDataBytes=new Float32Array(_canvasOrigin_dataPtr.buffer,_canvasOrigin_dataPtr.byteOffset,_canvasOrigin_dataPtr.length),_canvasOrigin_nDataBytes=new Float32Array(_canvasPPU_dataPtr.buffer,_canvasPPU_dataPtr.byteOffset,_canvasPPU_dataPtr.length),this.CanvasWidth=_canvasSize_data[0],this.CanvasHeight=_canvasSize_data[1],this.CanvasOriginX=_canvasSize_nDataBytes[0],this.CanvasOriginY=_canvasSize_nDataBytes[1],this.PixelsPerUnit=_canvasOrigin_nDataBytes[0],_csm.free(_canvasSize_dataPtr.byteOffset),_csm.free(_canvasOrigin_dataPtr.byteOffset),_csm.free(_canvasPPU_dataPtr.byteOffset))}),Parameters=(Live2DCubismCore.CanvasInfo=CanvasInfo,function(modelPtr){this.count=_csm.getParameterCount(modelPtr),length=_csm.getParameterCount(modelPtr),this.ids=new Array(length);for(var length,length2,_ids=new Uint32Array(_em.HEAPU32.buffer,_csm.getParameterIds(modelPtr),length),i=0;i<_ids.length;i++)this.ids[i]=_em.UTF8ToString(_ids[i]);length=_csm.getParameterCount(modelPtr),this.minimumValues=new Float32Array(_em.HEAPF32.buffer,_csm.getParameterMinimumValues(modelPtr),length),length=_csm.getParameterCount(modelPtr),this.types=new Int32Array(_em.HEAP32.buffer,_csm.getParameterTypes(modelPtr),length),length=_csm.getParameterCount(modelPtr),this.maximumValues=new Float32Array(_em.HEAPF32.buffer,_csm.getParameterMaximumValues(modelPtr),length),length=_csm.getParameterCount(modelPtr),this.defaultValues=new Float32Array(_em.HEAPF32.buffer,_csm.getParameterDefaultValues(modelPtr),length),length=_csm.getParameterCount(modelPtr),this.values=new Float32Array(_em.HEAPF32.buffer,_csm.getParameterValues(modelPtr),length),length=_csm.getParameterCount(modelPtr),this.keyCounts=new Int32Array(_em.HEAP32.buffer,_csm.getParameterKeyCounts(modelPtr),length),length=_csm.getParameterCount(modelPtr),length2=new Int32Array(_em.HEAP32.buffer,_csm.getParameterKeyCounts(modelPtr),length),this.keyValues=new Array(length);for(var _keyValues=new Uint32Array(_em.HEAPU32.buffer,_csm.getParameterKeyValues(modelPtr),length),i=0;i<_keyValues.length;i++)this.keyValues[i]=new Float32Array(_em.HEAPF32.buffer,_keyValues[i],length2[i])}),Parts=(Live2DCubismCore.Parameters=Parameters,function(modelPtr){this.count=_csm.getPartCount(modelPtr),length=_csm.getPartCount(modelPtr),this.ids=new Array(length);for(var length,_ids=new Uint32Array(_em.HEAPU32.buffer,_csm.getPartIds(modelPtr),length),i=0;i<_ids.length;i++)this.ids[i]=_em.UTF8ToString(_ids[i]);length=_csm.getPartCount(modelPtr),this.opacities=new Float32Array(_em.HEAPF32.buffer,_csm.getPartOpacities(modelPtr),length),length=_csm.getPartCount(modelPtr),this.parentIndices=new Int32Array(_em.HEAP32.buffer,_csm.getPartParentPartIndices(modelPtr),length)}),Drawables=(Live2DCubismCore.Parts=Parts,function(){function Drawables(modelPtr){this._modelPtr=modelPtr;for(var length,length2=null,_ids=(this.count=_csm.getDrawableCount(modelPtr),length=_csm.getDrawableCount(modelPtr),this.ids=new Array(length),new Uint32Array(_em.HEAPU32.buffer,_csm.getDrawableIds(modelPtr),length)),i=0;i<_ids.length;i++)this.ids[i]=_em.UTF8ToString(_ids[i]);length=_csm.getDrawableCount(modelPtr),this.constantFlags=new Uint8Array(_em.HEAPU8.buffer,_csm.getDrawableConstantFlags(modelPtr),length),length=_csm.getDrawableCount(modelPtr),this.dynamicFlags=new Uint8Array(_em.HEAPU8.buffer,_csm.getDrawableDynamicFlags(modelPtr),length),length=_csm.getDrawableCount(modelPtr),this.textureIndices=new Int32Array(_em.HEAP32.buffer,_csm.getDrawableTextureIndices(modelPtr),length),length=_csm.getDrawableCount(modelPtr),this.drawOrders=new Int32Array(_em.HEAP32.buffer,_csm.getDrawableDrawOrders(modelPtr),length),length=_csm.getDrawableCount(modelPtr),this.renderOrders=new Int32Array(_em.HEAP32.buffer,_csm.getDrawableRenderOrders(modelPtr),length),length=_csm.getDrawableCount(modelPtr),this.opacities=new Float32Array(_em.HEAPF32.buffer,_csm.getDrawableOpacities(modelPtr),length),length=_csm.getDrawableCount(modelPtr),this.maskCounts=new Int32Array(_em.HEAP32.buffer,_csm.getDrawableMaskCounts(modelPtr),length),length=_csm.getDrawableCount(modelPtr),this.vertexCounts=new Int32Array(_em.HEAP32.buffer,_csm.getDrawableVertexCounts(modelPtr),length),length=_csm.getDrawableCount(modelPtr),this.indexCounts=new Int32Array(_em.HEAP32.buffer,_csm.getDrawableIndexCounts(modelPtr),length),length=_csm.getDrawableCount(modelPtr),this.multiplyColors=new Float32Array(_em.HEAPF32.buffer,_csm.getDrawableMultiplyColors(modelPtr),4*length),length=_csm.getDrawableCount(modelPtr),this.screenColors=new Float32Array(_em.HEAPF32.buffer,_csm.getDrawableScreenColors(modelPtr),4*length),length=_csm.getDrawableCount(modelPtr),this.parentPartIndices=new Int32Array(_em.HEAP32.buffer,_csm.getDrawableParentPartIndices(modelPtr),length),length=_csm.getDrawableCount(modelPtr),length2=new Int32Array(_em.HEAP32.buffer,_csm.getDrawableMaskCounts(modelPtr),length),this.masks=new Array(length);for(var _masks=new Uint32Array(_em.HEAPU32.buffer,_csm.getDrawableMasks(modelPtr),length),i=0;i<_masks.length;i++)this.masks[i]=new Int32Array(_em.HEAP32.buffer,_masks[i],length2[i]);length=_csm.getDrawableCount(modelPtr),length2=new Int32Array(_em.HEAP32.buffer,_csm.getDrawableVertexCounts(modelPtr),length),this.vertexPositions=new Array(length);for(var _vertexPositions=new Uint32Array(_em.HEAPU32.buffer,_csm.getDrawableVertexPositions(modelPtr),length),i=0;i<_vertexPositions.length;i++)this.vertexPositions[i]=new Float32Array(_em.HEAPF32.buffer,_vertexPositions[i],2*length2[i]);length=_csm.getDrawableCount(modelPtr),length2=new Int32Array(_em.HEAP32.buffer,_csm.getDrawableVertexCounts(modelPtr),length),this.vertexUvs=new Array(length);for(var _vertexUvs=new Uint32Array(_em.HEAPU32.buffer,_csm.getDrawableVertexUvs(modelPtr),length),i=0;i<_vertexUvs.length;i++)this.vertexUvs[i]=new Float32Array(_em.HEAPF32.buffer,_vertexUvs[i],2*length2[i]);length=_csm.getDrawableCount(modelPtr),length2=new Int32Array(_em.HEAP32.buffer,_csm.getDrawableIndexCounts(modelPtr),length),this.indices=new Array(length);for(var _indices=new Uint32Array(_em.HEAPU32.buffer,_csm.getDrawableIndices(modelPtr),length),i=0;i<_indices.length;i++)this.indices[i]=new Uint16Array(_em.HEAPU16.buffer,_indices[i],length2[i])}return Drawables.prototype.resetDynamicFlags=function(){_csm.resetDrawableDynamicFlags(this._modelPtr)},Drawables}()),Version=(Live2DCubismCore.Drawables=Drawables,function(){function Utils(){}return Utils.hasBlendAdditiveBit=function(bitfield){return 1==(1&bitfield)},Utils.hasBlendMultiplicativeBit=function(bitfield){return 2==(2&bitfield)},Utils.hasIsDoubleSidedBit=function(bitfield){return 4==(4&bitfield)},Utils.hasIsInvertedMaskBit=function(bitfield){return 8==(8&bitfield)},Utils.hasIsVisibleBit=function(bitfield){return 1==(1&bitfield)},Utils.hasVisibilityDidChangeBit=function(bitfield){return 2==(2&bitfield)},Utils.hasOpacityDidChangeBit=function(bitfield){return 4==(4&bitfield)},Utils.hasDrawOrderDidChangeBit=function(bitfield){return 8==(8&bitfield)},Utils.hasRenderOrderDidChangeBit=function(bitfield){return 16==(16&bitfield)},Utils.hasVertexPositionsDidChangeBit=function(bitfield){return 32==(32&bitfield)},Utils.hasBlendColorDidChangeBit=function(bitfield){return 64==(64&bitfield)},Utils}()),Version=(Live2DCubismCore.Utils=Version,function(){function Memory(){}return Memory.initializeAmountOfMemory=function(size){16777216>2]+(Ln<<5)|0)>>2],Pn=q[a+60>>2]+w(Wn,24)|0,Ln=(ko=q[Pn+8>>2])+-1|0,xo=(qo=q[Pn+4>>2])+-1|0,yo=uo=(Wn=q[q[a+152>>2]+(Wn<<2)>>2])+(ko<<3)|0,zo=vo=Wn+((to=w(qo,lo=ko+1|0))<<3)|0,Ao=wo=Wn+(ko+to<<3)|0,Io=q[Pn+12>>2],ro=x(0|qo),so=x(0|ko),a=0;Vn=u[4+(Pn=(oo=a<<3)+Mn|0)>>2],Rn=x(Vn*ro),Xn=u[Pn>>2],Qn=x(Xn*so),Pn=Vn>=x(1),Rn=!(Vn=x(1)|Xn>2],Bo=u[Wn+4>>2],Yn=x(ao-Bo),Co=u[4+yo>>2],Do=u[4+zo>>2],Zn=x(Co-Do),bo=x(x(Yn-Zn)*x(.5)),Eo=u[wo>>2],Fo=u[Wn>>2],_n=x(Eo-Fo),Go=u[uo>>2],Ho=u[vo>>2],$n=x(Go-Ho),co=x(x(_n-$n)*x(.5)),Zn=x(x(Zn+Yn)*x(.5)),$n=x(x($n+_n)*x(.5)),Jo=1,Yn=x(x(x(x(x(Bo+Co)+Do)+ao)*x(.25))-x(Yn*x(.5))),_n=x(x(x(x(x(Fo+Go)+Ho)+Eo)*x(.25))-x(_n*x(.5)))),Vnx(-2)^1|(Xnx(-2)^1)?(u[Nn+oo>>2]=x(Vn*co)+x(x(Xn*$n)+_n),Qn=x(Vn*bo),x(x(Xn*Zn)+Yn)):(Xn<=x(0)?Vn<=x(0)?(Un=x(x(Vn+x(2))*x(.5)),Tn=x(x(Xn+x(2))*x(.5)),Qn=x(bo+bo),mo=x(Yn-Qn),Rn=x(co+co),no=x(_n-Rn),io=x(Yn-x(Zn+Zn)),eo=x(io-Qn),jo=x(_n-x($n+$n)),fo=x(jo-Rn),go=u[Wn+4>>2],ho=u[Wn>>2]):Pn?(Qn=x(bo*x(3)),Rn=x(Yn-x(Zn+Zn)),io=x(Qn+Rn),eo=x(co*x(3)),fo=x(_n-x($n+$n)),jo=x(eo+fo),Un=x(x(Vn+x(-1))*x(.5)),Tn=x(x(Xn+x(2))*x(.5)),go=x(Qn+Yn),ho=x(eo+_n),eo=x(bo+Rn),fo=x(co+fo),mo=u[4+zo>>2],no=u[vo>>2]):(Qn=x(Yn-x(Zn+Zn)),Pn=xo,Sn=x(y(Rn))>2],no=u[Pn>>2],Pn=Wn+(w(Sn,lo)<<3)|0,go=u[Pn+4>>2],ho=u[Pn>>2]):Xn>=x(1)?Vn<=x(0)?(Un=x(x(Vn+x(2))*x(.5)),Tn=x(x(Xn+x(-1))*x(.5)),Qn=x(bo+bo),eo=x(x(Zn+Yn)-Qn),Rn=x(co+co),fo=x(x($n+_n)-Rn),go=x(x(Zn*x(3))+Yn),mo=x(go-Qn),ho=x(x($n*x(3))+_n),no=x(ho-Rn),io=u[4+yo>>2],jo=u[uo>>2]):Pn?(Qn=x(bo*x(3)),io=x(Qn+x(Zn+Yn)),Rn=x(co*x(3)),jo=x(Rn+x($n+_n)),ao=Qn,Qn=x(x(Zn*x(3))+Yn),go=x(ao+Qn),ao=Rn,Rn=x(x($n*x(3))+_n),ho=x(ao+Rn),Un=x(x(Vn+x(-1))*x(.5)),Tn=x(x(Xn+x(-1))*x(.5)),mo=x(bo+Qn),no=x(co+Rn),eo=u[4+Ao>>2],fo=u[wo>>2]):(Qn=x(x(Zn*x(3))+Yn),Pn=xo,Sn=x(y(Rn))>2],fo=u[Pn>>2],Pn=Wn+(w(Sn,lo)+ko<<3)|0,io=u[Pn+4>>2],jo=u[Pn>>2]):Vn<=x(0)?(Un=x(x(Vn+x(2))*x(.5)),Pn=Ln,Sn=x(y(Rn=Qn))>2],jo=u[Pn>>2],go=u[4+(Pn=Wn+(Sn<<3)|0)>>2],ho=u[Pn>>2]):Pn?(ao=Rn=x(bo*x(3)),Pn=Ln,Sn=x(y(Qn))>2],fo=u[Pn>>2],mo=u[4+(Pn=Wn+(Sn+to<<3)|0)>>2],no=u[Pn>>2]):(v[16+po>>3]=Vn,q[po>>2]=a,v[8+po>>3]=Xn,Y(4,1107,po)),x(Tn+Un)<=x(1)?(u[Nn+oo>>2]=x(fo+x(x(no-fo)*Tn))+x(x(jo-fo)*Un),Qn=x(eo+x(x(mo-eo)*Tn)),x(x(io-eo)*Un)):(Qn=x(x(1)-Tn),Rn=x(x(1)-Un),u[Nn+oo>>2]=x(ho+x(x(jo-ho)*Qn))+x(x(no-ho)*Rn),Qn=x(go+x(x(io-go)*Qn)),x(x(mo-go)*Rn)))):(Pn=x(y(ao=Rn))>2]=x(x(x(Qn*x(Rn*u[Sn>>2]))+x(Qn*x(Tn*u[Sn+8>>2])))+x(Un*x(Rn*u[Pn>>2])))+x(Un*x(Tn*u[Pn+8>>2])),Qn=x(x(x(Qn*x(Rn*u[Sn+4>>2]))+x(Qn*x(Tn*u[Sn+12>>2])))+x(Un*x(Rn*u[Pn+4>>2]))),x(Un*x(Tn*u[Pn+12>>2]))):x(Tn+Un)<=x(1)?(Qn=x(x(x(1)-Tn)-Un),Sn=Wn+(Pn<<3)|0,Pn=Wn+(Pn+lo<<3)|0,u[Nn+oo>>2]=x(x(Qn*u[Sn>>2])+x(Tn*u[Sn+8>>2]))+x(Un*u[Pn>>2]),Qn=x(x(Qn*u[Sn+4>>2])+x(Tn*u[Sn+12>>2])),x(Un*u[Pn+4>>2])):(Qn=x(x(Tn+x(-1))+Un),Sn=Wn+(Pn+lo<<3)|0,Rn=x(x(1)-Tn),Vn=x(x(1)-Un),Pn=Wn+(Pn<<3)|0,u[Nn+oo>>2]=x(x(Qn*u[Sn+8>>2])+x(Rn*u[Sn>>2]))+x(Vn*u[Pn+8>>2]),Qn=x(x(Qn*u[Sn+12>>2])+x(Rn*u[Sn+4>>2])),x(Vn*u[Pn+12>>2]))),u[4+(Nn+oo|0)>>2]=Qn+Rn,(0|On)!=(0|(a=a+1|0)););L=32+po|0},n[2]=function(a,mh){a|=0,mh|=0;var Dh=0,Eh=0,Fh=0,Gh=0,Hh=0,Ih=x(0),Jh=0,Kh=0,Mh=(x(0),0),Nh=0,Gh=q[a+320>>2],Dh=q[a+316>>2],Hh=q[a+308>>2];-1==(0|(Eh=q[8+(Fh=Hh+(mh<<5)|0)>>2]))?(q[(Nh=Dh)+(Dh=mh<<2)>>2]=q[q[a+148>>2]+(q[Fh+16>>2]<<2)>>2],q[Dh+Gh>>2]=1065353216):(Jh=q[Fh+16>>2],Kh=q[q[a+152>>2]+(Jh<<2)>>2],n[q[24+(Hh+(Eh<<5)|0)>>2]](a,Eh,Kh,Kh,q[16+(q[a+60>>2]+w(Jh,24)|0)>>2]),Ih=u[q[a+148>>2]+(q[Fh+16>>2]<<2)>>2],Fh=q[Fh+8>>2]<<2,u[(Eh=mh<<2)+Dh>>2]=Ih*u[Fh+Dh>>2],q[Eh+Gh>>2]=q[Fh+Gh>>2]),4<=r[q[a>>2]+4|0]&&(Gh=mh<<2,Dh=q[a+308>>2]+(mh<<5)|0,Eh=q[Dh+16>>2]<<2,Fh=q[a+328>>2],mh=q[a+324>>2],-1==(0|(Hh=q[Dh+8>>2]))?(Hh=q[a+156>>2],q[(Dh=Gh<<2)+mh>>2]=q[Hh+(Eh<<=2)>>2],q[(Jh=4|Dh)+mh>>2]=q[(Kh=4|Eh)+Hh>>2],q[(Mh=8|Dh)+mh>>2]=q[Hh+(Nh=8|Eh)>>2],q[mh+((Gh|=3)<<2)>>2]=1065353216,a=q[a+160>>2],q[Dh+Fh>>2]=q[a+Eh>>2],q[Fh+Jh>>2]=q[a+Kh>>2],q[Fh+Mh>>2]=q[a+Nh>>2]):(Eh=(Kh=Eh<<2)+q[a+156>>2]|0,u[(Dh=(Jh=Gh<<2)+mh|0)>>2]=u[Eh>>2]*u[(Hh=(Mh=Hh<<4)+mh|0)>>2],u[Dh+4>>2]=u[Eh+4>>2]*u[Hh+4>>2],u[Dh+8>>2]=u[Eh+8>>2]*u[Hh+8>>2],q[mh+((Gh|=3)<<2)>>2]=1065353216,a=Kh+q[a+160>>2]|0,Nh=u[a>>2],Ih=u[(Dh=Fh+Mh|0)>>2],u[(mh=Fh+Jh|0)>>2]=x(Nh+Ih)-x(Nh*Ih),Nh=u[a+4>>2],Ih=u[Dh+4>>2],u[mh+4>>2]=x(Nh+Ih)-x(Nh*Ih),Nh=u[a+8>>2],Ih=u[Dh+8>>2],u[mh+8>>2]=x(Nh+Ih)-x(Nh*Ih)),q[Fh+(Gh<<2)>>2]=1065353216)},n[3]=function(a,Sm,un,xn,yn){a|=0,Sm|=0,un|=0,xn|=0,yn|=0;var Dn,En,Fn,Hn,In,zn=0,zn=(x(0),x(0),x(0),x(0),x(0),x(0),x(0),x(0),(Sm=q[16+(q[a+308>>2]+(Sm<<5)|0)>>2])<<2),Bn=function(a){var El,Hl,Fl,Gl,Dl=x(0);L=Fl=L-16|0,j(a);a:if((El=2147483647&(Gl=b[0]))>>>0<=1061752794)Dl=x(1),El>>>0<964689920||(Dl=ba(+a));else if(El>>>0<=1081824209)Hl=+a,Dl=1075235812<=El>>>0?x(-ba(((0|Gl)<0?3.141592653589793:-3.141592653589793)+Hl)):aa((0|Gl)<=-1?1.5707963267948966+Hl:1.5707963267948966-Hl);else if(El>>>0<=1088565717)Dl=1085271520<=El>>>0?ba(+a+((0|Gl)<0?6.283185307179586:-6.283185307179586)):aa((0|Gl)<=-1?-4.71238898038469-+a:+a-4.71238898038469);else if(Dl=x(a-a),!(2139095040<=El>>>0))if((El=3&Da(a,8+Fl|0))>>>0<=2){switch(El-1|0){default:Dl=ba(v[8+Fl>>3]);break a;case 0:Dl=aa(-v[8+Fl>>3]);break a;case 1:}Dl=x(-ba(v[8+Fl>>3]))}else Dl=aa(v[8+Fl>>3]);return L=16+Fl|0,Dl}(An=x(x(x(u[4+(q[a+168>>2]+w(Sm,12)|0)>>2]+u[zn+q[a+284>>2]>>2])*x(3.1415927410125732))/x(180))),Cn=u[zn+q[a+272>>2]>>2],Gn=q[zn+q[a+292>>2]>>2],An=function(a){var Vk,Al,Cl,Bl=0;L=Al=L-16|0,j(a);a:if((Vk=2147483647&(Cl=b[0]))>>>0<=1061752794)Vk>>>0<964689920||(a=aa(+a));else if(Vk>>>0<=1081824209)Bl=+a,a=Vk>>>0<=1075235811?(0|Cl)<=-1?x(-ba(Bl+1.5707963267948966)):ba(Bl+-1.5707963267948966):aa(-(((0|Cl)<0?3.141592653589793:-3.141592653589793)+Bl));else if(Vk>>>0<=1088565717)Bl=+a,a=Vk>>>0<=1085271519?(0|Cl)<=-1?ba(Bl+4.71238898038469):x(-ba(Bl+-4.71238898038469)):aa(((0|Cl)<0?6.283185307179586:-6.283185307179586)+Bl);else if(2139095040<=Vk>>>0)a=x(a-a);else if((Vk=3&Da(a,8+Al|0))>>>0<=2){switch(Vk-1|0){default:a=aa(v[8+Al>>3]);break a;case 0:a=ba(v[8+Al>>3]);break a;case 1:}a=aa(-v[8+Al>>3])}else a=x(-ba(v[8+Al>>3]));return L=16+Al|0,a}(An);if((Sm=0)<(0|yn))for(Bn=x(Cn*Bn),En=x(Gn?-1:1),Hn=x(Bn*En),Dn=q[zn+q[a+288>>2]>>2]?x(-1):x(1),In=x(x(Cn*An)*Dn),Bn=x(Bn*Dn),Cn=x(x(Cn*x(-An))*En),An=u[zn+q[a+280>>2]>>2],En=u[zn+q[a+276>>2]>>2];zn=(a=Sm<<3)+xn|0,Dn=u[(a=a+un|0)>>2],Fn=u[a+4>>2],u[zn+4>>2]=An+x(x(In*Dn)+x(Hn*Fn)),u[zn>>2]=En+x(x(Bn*Dn)+x(Cn*Fn)),(0|yn)!=(0|(Sm=Sm+1|0)););},n[4]=function(a,mh){a|=0,mh|=0;var yh,zh,Ah,Bh,Ch,nh,oh=0,ph=0,qh=0,rh=x(0),sh=0,th=0,uh=x(0),vh=0,wh=0,xh=0;if(x(0),x(0),x(0),x(0),L=nh=L+-64|0,vh=q[a+320>>2],wh=q[a+316>>2],ph=q[a+308>>2],-1==(0|(sh=q[8+(qh=ph+(mh<<5)|0)>>2])))oh=q[qh+16>>2]<<2,q[(ph=mh<<2)+wh>>2]=q[oh+q[a+268>>2]>>2],q[ph+vh>>2]=q[oh+q[a+272>>2]>>2];else{oh=q[qh+16>>2]<<2,xh=q[oh+q[a+276>>2]>>2],q[24+nh>>2]=xh,oh=q[oh+q[a+280>>2]>>2],q[28+nh>>2]=oh,q[16+nh>>2]=0,zh=1==q[12+(th=ph+(sh<<5)|0)>>2]?x(-10):x(-.10000000149011612),u[20+nh>>2]=zh,q[60+nh>>2]=oh,q[56+nh>>2]=xh,n[q[th+24>>2]](a,sh,56+nh|0,48+nh|0,1),rh=x(1),ph=9;b:{for(;;){if(oh=ph,uh=x(rh*x(0)),u[32+nh>>2]=uh+u[56+nh>>2],yh=x(zh*rh),u[36+nh>>2]=yh+u[60+nh>>2],n[q[th+24>>2]](a,sh,32+nh|0,40+nh|0,1),Ah=x(u[44+nh>>2]-u[52+nh>>2]),u[44+nh>>2]=Ah,Bh=x(u[40+nh>>2]-u[48+nh>>2]),u[40+nh>>2]=Bh,Ah!=x(0)||Bh!=x(0)){ph=q[44+nh>>2],q[8+nh>>2]=q[40+nh>>2],q[12+nh>>2]=ph;break b}if(u[32+nh>>2]=u[56+nh>>2]-uh,u[36+nh>>2]=u[60+nh>>2]-yh,n[q[th+24>>2]](a,sh,32+nh|0,40+nh|0,1),uh=x(u[40+nh>>2]-u[48+nh>>2]),u[40+nh>>2]=uh,yh=x(u[44+nh>>2]-u[52+nh>>2]),(u[44+nh>>2]=yh)!=x(0)||uh!=x(0)){u[12+nh>>2]=-yh,u[8+nh>>2]=-uh;break b}if(ph=oh+-1|0,rh=x(rh*x(.10000000149011612)),!oh)break}Y(3,1311,0)}rh=function(a,ji){var ki=x(0);if((ki=x(Ba(u[4+a>>2],u[a>>2])-Ba(u[4+ji>>2],u[ji>>2])))x(3.1415927410125732))for(;(ki=x(ki+x(-6.2831854820251465)))>x(3.1415927410125732););return ki}(16+nh|0,8+nh|0),n[q[th+24>>2]](a,q[qh+8>>2],24+nh|0,24+nh|0,1),ph=q[qh+16>>2]<<2,q[ph+q[a+276>>2]>>2]=q[24+nh>>2],q[ph+q[a+280>>2]>>2]=q[28+nh>>2],oh=ph+q[a+284>>2]|0,u[oh>>2]=u[oh>>2]+x(x(rh*x(-180))/x(3.1415927410125732)),qh=q[qh+8>>2]<<2,u[(oh=mh<<2)+wh>>2]=u[ph+q[a+268>>2]>>2]*u[qh+wh>>2],ph=ph+q[a+272>>2]|0,rh=x(u[ph>>2]*u[qh+vh>>2]),u[oh+vh>>2]=rh,u[ph>>2]=rh}4<=r[q[a>>2]+4|0]&&(oh=mh<<2,qh=q[a+308>>2]+(mh<<5)|0,sh=q[qh+16>>2]<<2,ph=q[a+328>>2],mh=q[a+324>>2],-1==(0|(th=q[qh+8>>2]))?(th=q[a+296>>2],q[(qh=oh<<2)+mh>>2]=q[th+(sh<<=2)>>2],q[(vh=4|qh)+mh>>2]=q[(wh=4|sh)+th>>2],q[(xh=8|qh)+mh>>2]=q[th+(Ch=8|sh)>>2],q[mh+((oh|=3)<<2)>>2]=1065353216,a=q[a+300>>2],q[ph+qh>>2]=q[a+sh>>2],q[ph+vh>>2]=q[a+wh>>2],q[ph+xh>>2]=q[a+Ch>>2]):(sh=(wh=sh<<2)+q[a+296>>2]|0,u[(qh=(vh=oh<<2)+mh|0)>>2]=u[sh>>2]*u[(th=(xh=th<<4)+mh|0)>>2],u[qh+4>>2]=u[sh+4>>2]*u[th+4>>2],u[qh+8>>2]=u[sh+8>>2]*u[th+8>>2],q[mh+((oh|=3)<<2)>>2]=1065353216,a=wh+q[a+300>>2]|0,rh=u[a>>2],uh=u[(qh=ph+xh|0)>>2],u[(mh=ph+vh|0)>>2]=x(rh+uh)-x(rh*uh),rh=u[a+4>>2],uh=u[qh+4>>2],u[mh+4>>2]=x(rh+uh)-x(rh*uh),rh=u[a+8>>2],uh=u[qh+8>>2],u[mh+8>>2]=x(rh+uh)-x(rh*uh)),q[ph+(oh<<2)>>2]=1065353216),L=64+nh|0},n[5]=function(a,Vk){return a|=0,Vk|=0,x(0),x(0),0|((a=u[a>>2])<(Vk=u[Vk>>2])?-1:Vk>2])))for(_j=q[a+12>>2],Zj=q[a+20>>2];u[(Wj=Vj<<2)+_j>>2]=u[vj+Wj>>2]*u[Wj+Zj>>2],(0|(Vj=Vj+1|0))<(0|Yj););if(!((0|(Yj=q[a>>2]))<1))if(_j=q[a+4>>2],yj)for(Wj=vj=0;;){if(q[yj>>2]){if((0|(Vj=q[(Zj=vj<<2)+q[a+16>>2]>>2]))<1)Xj=x(0);else for($j=Vj+Wj|0,ak=q[a+12>>2],Xj=x(0),Vj=Wj;Xj=x(Xj+u[ak+(Vj<<2)>>2]),(0|(Vj=Vj+1|0))<(0|$j););u[xj+Zj>>2]=Xj}if(yj=yj+4|0,Wj=q[_j+(vj<<2)>>2]+Wj|0,!((0|(vj=vj+1|0))<(0|Yj)))break}else for(Zj=q[a+16>>2],vj=yj=0;;){if((0|(Vj=q[(Wj=yj<<2)+Zj>>2]))<=0)Xj=x(0);else for($j=vj+Vj|0,ak=q[a+12>>2],Xj=x(0),Vj=vj;Xj=x(Xj+u[ak+(Vj<<2)>>2]),(0|(Vj=Vj+1|0))<(0|$j););if(u[xj+Wj>>2]=Xj,vj=q[Wj+_j>>2]+vj|0,!((0|(yj=yj+1|0))<(0|Yj)))break}},n[7]=function(a,vj,xj,yj){a|=0,vj|=0,xj|=0,yj|=0;var zj=0,Aj=x(0),Qj=0,Rj=0,Sj=0,Tj=0,Uj=0;if(1<=(0|(Tj=q[a+8>>2])))for(Rj=q[a+12>>2],Sj=q[a+20>>2];u[(Qj=zj<<2)+Rj>>2]=u[vj+Qj>>2]*u[Qj+Sj>>2],(0|(zj=zj+1|0))<(0|Tj););if(!((0|(zj=q[a>>2]))<1))if(Tj=q[a+4>>2],yj)for(Qj=vj=0;;){if(q[yj>>2]){if((0|(zj=q[(Rj=vj<<2)+q[a+16>>2]>>2]))<1)Aj=x(0);else for(Sj=zj+Qj|0,Uj=q[a+12>>2],Aj=x(0),zj=Qj;Aj=x(Aj+u[Uj+(zj<<2)>>2]),(0|(zj=zj+1|0))<(0|Sj););zj=xj+Rj|0,Aj=x(Aj+x(.0010000000474974513)),Rj=x(y(Aj))>2]=Rj,zj=q[a>>2]}if(yj=yj+4|0,Qj=q[Tj+(vj<<2)>>2]+Qj|0,!((0|(vj=vj+1|0))<(0|zj)))break}else for(Rj=q[a+16>>2],vj=yj=0;;){if((0|(zj=q[(Qj=yj<<2)+Rj>>2]))<=0)Aj=x(0);else for(Sj=vj+zj|0,Uj=q[a+12>>2],Aj=x(0),zj=vj;Aj=x(Aj+u[Uj+(zj<<2)>>2]),(0|(zj=zj+1|0))<(0|Sj););if(zj=xj+Qj|0,Aj=x(Aj+x(.0010000000474974513)),Sj=x(y(Aj))>2]=Sj,vj=q[Qj+Tj>>2]+vj|0,!((0|(yj=yj+1|0))>2]))break}},n[8]=function(a,vj,xj,yj,zj,Aj){a|=0,vj|=0,xj|=0,yj|=0,zj|=0,Aj|=0;var Oj,Pj,Bj=0,Cj=0,Dj=0,Ej=0,Fj=0,Gj=0,Hj=0,Ij=0,Kj=0,Lj=0,Mj=x(0),Nj=0,Jj=q[a>>2];if(!((0|Jj)<1))if(Oj=zj<<2,Pj=q[a+4>>2],Aj)for(;;){if(q[Aj>>2]&&(Dj=q[(Bj=Ej<<2)+q[a+16>>2]>>2],Hj=q[xj+Bj>>2],Cj=q[yj+Bj>>2],(Bj=(0|(Ij=w(Cj,zj)))<1)||ca(Hj,0,w(Cj,Oj)),!(Bj|(0|Dj)<1)))for(Kj=Dj+Gj|0,Lj=q[a+20>>2],Bj=Gj;;){for(Mj=u[(Cj=Bj<<2)+Lj>>2],Nj=q[vj+Cj>>2],Fj=0;u[(Cj=(Dj=Fj<<2)+Hj|0)>>2]=u[Cj>>2]+x(Mj*u[Dj+Nj>>2]),(0|Ij)!=(0|(Fj=Fj+1|0)););if(!((0|(Bj=Bj+1|0))<(0|Kj)))break}if(Aj=Aj+4|0,Gj=q[(Ej<<2)+Pj>>2]+Gj|0,!((0|(Ej=Ej+1|0))<(0|Jj)))break}else for(Aj=0;;){if(Dj=q[(Ej=Aj<<2)+q[a+16>>2]>>2],Hj=q[xj+Ej>>2],Cj=q[yj+Ej>>2],(Bj=(0|(Ij=w(Cj,zj)))<1)||ca(Hj,0,w(Cj,Oj)),!(Bj|(0|Dj)<=0))for(Kj=Dj+Gj|0,Lj=q[a+20>>2],Bj=Gj;;){for(Mj=u[(Cj=Bj<<2)+Lj>>2],Nj=q[vj+Cj>>2],Fj=0;u[(Cj=(Dj=Fj<<2)+Hj|0)>>2]=u[Cj>>2]+x(Mj*u[Dj+Nj>>2]),(0|Ij)!=(0|(Fj=Fj+1|0)););if(!((0|(Bj=Bj+1|0))<(0|Kj)))break}if(Gj=q[Ej+Pj>>2]+Gj|0,!((0|(Aj=Aj+1|0))<(0|Jj)))break}},n[9]=function(a){var Me,Ne,Oe,Ie=0,Je=0,Ke=0,Le=0;if(!(q[(a|=0)+648>>2]||(0|(Ie=q[a+332>>2]))<1))for(Ne=(Je=q[a+336>>2])+w(Ie,20)|0,Ie=q[a+424>>2],Le=q[a+444>>2];;){if(q[Ie>>2]&&!((0|(Ke=q[Je+16>>2]))<(a=1)))for(Ke<<=1,Oe=q[Le>>2];u[(Me=(a<<2)+Oe|0)>>2]=-u[Me>>2],(0|(a=a+2|0))<(0|Ke););if(Le=Le+4|0,Ie=Ie+4|0,!((Je=Je+20|0)>>>0>>0))break}},n[10]=function(a,Sm,un){var wn;return $(wn=q[20+(a|=0)>>2],Sm|=0,Sm=(un|=0)>>>0<(Sm=q[a+16>>2]-wn|0)>>>0?un:Sm),q[a+20>>2]=Sm+q[a+20>>2],0|un},n[11]=function(a,Il,Rm,Sm,Tm,Um){a|=0,Il=+Il,Rm|=0,Sm|=0,Tm|=0,Um|=0;var fn,qn,Zm,kn,Vm=0,Wm=0,Xm=0,Ym=0,_m=0,$m=0,an=0,bn=0,cn=0,dn=0,en=0,gn=0,hn=0,jn=0,mn=0;if(q[44+(L=Zm=L-560|0)>>2]=0,h(+Il),Vm=0|b[1],qn=4294967295>>0?0:1,kn=(0|Vm)<-1||(0|Vm)<=-1&&qn?(h(Il=-Il),Vm=0|b[1],b[0],jn=1,3840):2048&Tm?(jn=1,3843):(jn=1&Tm)?3846:3841,2146435072==(2146435072&Vm))_(a,32,Rm,$m=jn+3|0,-65537&Tm),Z(a,kn,jn),Sm=Um>>>5&1,Z(a,Il!=Il?Sm?3867:3871:Sm?3859:3863,3);else if(Il=function Ja(a,ic){var kc,lc,jc=0;if(h(+a),jc=0|b[1],kc=0|b[0],2047!=(0|(jc=(lc=jc)>>>20&2047))){if(!jc)return jc=ic,ic=0==a?0:(a=Ja(0x10000000000000000*a,ic),q[ic>>2]+-64|0),q[jc>>2]=ic,a;q[ic>>2]=jc+-1022,f(0,0|kc),f(1,-2146435073&lc|1071644672),a=+g()}return a}(Il,44+Zm|0),0!=(Il+=Il)&&(q[44+Zm>>2]=q[44+Zm>>2]+-1),fn=16+Zm|0,97==(0|(qn=32|Um))){if(en=(dn=32&Um)?9+kn|0:kn,!(11>>0)&&(Vm=12-Sm|0)){for(gn=8;gn*=16,Vm=Vm+-1|0;);Il=45==r[0|en]?-(gn+(-Il-gn)):Il+gn-gn}for((0|fn)==(0|(Vm=ga((Xm=(Vm=q[44+Zm>>2])>>31)^Vm+Xm,0,fn)))&&(o[15+Zm|0]=48,Vm=15+Zm|0),_m=2|jn,Xm=q[44+Zm>>2],o[0|(cn=Vm+-2|0)]=Um+15,o[Vm+-1|0]=(0|Xm)<0?45:43,Vm=8&Tm,Wm=16+Zm|0;Um=Wm,bn=dn,Xm=y(Il)<2147483648?~~Il:-2147483648,o[0|Wm]=bn|r[Xm+3824|0],1!=((Wm=Um+1|0)-(16+Zm|0)|0)|(0==(Il=16*(Il-(0|Xm)))?!(Vm|0<(0|Sm)):0)||(o[Um+1|0]=46,Wm=Um+2|0),0!=Il;);_(a,32,Rm,$m=(Um=!Sm|(0|Sm)<=((Wm-Zm|0)-18|0)?((fn-(16+Zm|0)|0)-cn|0)+Wm|0:2+((Sm+fn|0)-cn|0)|0)+_m|0,Tm),Z(a,en,_m),_(a,48,Rm,$m,65536^Tm),Z(a,16+Zm|0,Sm=Wm-(16+Zm|0)|0),_(a,48,Um-((Vm=Sm)+(Sm=fn-cn|0)|0)|0,0,0),Z(a,cn,Sm)}else{for(Vm=(0|Sm)<0,0==Il?Ym=q[44+Zm>>2]:(Ym=q[44+Zm>>2]+-28|0,q[44+Zm>>2]=Ym,Il*=268435456),an=Vm?6:Sm,Xm=dn=(0|Ym)<0?48+Zm|0:336+Zm|0;Xm=(Sm=Xm)+4|0,0!=(Il=1e9*(Il-((q[Sm>>2]=Vm=Il<4294967296&0<=Il?~~Il>>>0:0)>>>0))););if((0|Ym)<1)Vm=Xm,Wm=dn;else for(Wm=dn;;){if(cn=(0|Ym)<29?Ym:29,!((Vm=Xm+-4|0)>>>0>>0)){for(Sm=cn,bn=0;mn=bn,bn=q[(en=Vm)>>2],_m=31&Sm,_m=32<=(63&Sm)>>>($m=0)?(Ym=bn<<_m,0):(Ym=(1<<_m)-1&bn>>>32-_m,bn<<_m),$m=Ym+$m|0,$m=(bn=mn+_m|0)>>>0<_m>>>0?$m+1|0:$m,mn=en,en=bd(bn=cd(_m=bn,$m,1e9),M,1e9),q[mn>>2]=_m-en,Wm>>>0<=(Vm=Vm+-4|0)>>>0;);(Sm=bn)&&(q[(Wm=Wm+-4|0)>>2]=Sm)}for(;Wm>>>0<(Vm=Xm)>>>0&&!q[(Xm=Vm+-4|0)>>2];);if(Ym=q[44+Zm>>2]-cn|0,Xm=Vm,!(0<(0|(q[44+Zm>>2]=Ym))))break}if((0|Ym)<=-1)for(hn=1+((an+25|0)/9|0)|0,cn=102==(0|qn);;){if(bn=(0|Ym)<-9?9:0-Ym|0,Vm>>>0<=Wm>>>0)Wm=q[Wm>>2]?Wm:Wm+4|0;else{for(en=1e9>>>bn,_m=-1<>2],q[Xm>>2]=(Sm>>>bn)+Ym,Ym=w(en,Sm&_m),(Xm=Xm+4|0)>>>0>>0;);Wm=q[Wm>>2]?Wm:Wm+4|0,Ym&&(q[Vm>>2]=Ym,Vm=Vm+4|0)}if(Ym=bn+q[44+Zm>>2]|0,Vm=(0|hn)>2?Sm+(hn<<2)|0:Vm,!((0|(q[44+Zm>>2]=Ym))<0))break}if(!(Vm>>>(Xm=0)<=Wm>>>0||(Xm=w(dn-Wm>>2,9),(Sm=q[Wm>>2])>>>0<(Ym=10))))for(;Xm=Xm+1|0,(Ym=w(Ym,10))>>>0<=Sm>>>0;);if((0|(Sm=(an-(102==(0|qn)?0:Xm)|0)-(103==(0|qn)&0!=(0|an))|0))<(w(Vm-dn>>2,9)+-9|0)){if($m=(dn+((Sm=(0|(_m=Sm+9216|0))/9|0)<<2)|0)-4092|0,Ym=10,(0|(Sm=1+(_m-w(Sm,9)|0)|0))<=8)for(;Ym=w(Ym,10),9!=(0|(Sm=Sm+1|0)););if(hn=$m+4|0,((cn=(en=q[$m>>2])-w(Ym,_m=(en>>>0)/(Ym>>>0)|0)|0)||(0|hn)!=(0|Vm))&&(gn=cn>>>0<(Sm=Ym>>>1)>>>0?.5:(0|Vm)==(0|hn)&&(0|Sm)==(0|cn)?1:1.5,Il=1&_m?9007199254740994:9007199254740992,!jn|45!=r[0|kn]||(gn=-gn,Il=-Il),q[$m>>2]=Sm=en-cn|0,Il+gn!=Il)){if(1e9<=(q[$m>>2]=Sm=Sm+Ym|0)>>>0)for(;($m=$m+-4|(q[$m>>2]=0))>>>0>>0&&(q[(Wm=Wm+-4|0)>>2]=0),Sm=q[$m>>2]+1|0,999999999<(q[$m>>2]=Sm)>>>0;);if(Xm=w(dn-Wm>>2,9),!((Sm=q[Wm>>2])>>>0<(Ym=10)))for(;Xm=Xm+1|0,(Ym=w(Ym,10))>>>0<=Sm>>>0;);}Vm=(Sm=$m+4|0)>>>0>>0?Sm:Vm}j:{for(;;){if((cn=Vm)>>>(en=0)<=Wm>>>0)break j;if(q[(Vm=cn+-4|0)>>2])break}en=1}if(103!=(0|qn))_m=8&Tm;else if(an=((Sm=(0|Xm)<(0|(Vm=an||1))&-5<(0|Xm))?-1^Xm:-1)+Vm|0,Um=(Sm?-1:-2)+Um|0,!(_m=8&Tm)){if(Vm=9,en&&(_m=q[cn+-4>>2])&&!((_m>>>(Vm=0))%(Sm=10)))for(;Vm=Vm+1|0,!((_m>>>0)%((Sm=w(Sm,10))>>>0)););Sm=w(cn-dn>>2,9)+-9|0,an=102==(32|Um)?((_m=0)|an)<(0|(Sm=0<(0|(Sm=Sm-Vm|0))?Sm:0))?an:Sm:((_m=0)|an)<(0|(Sm=0<(0|(Sm=(Sm+Xm|0)-Vm|0))?Sm:0))?an:Sm}if($m=0!=(0|(Ym=an|_m)),Sm=a,mn=Rm,Vm=0<(0|Xm)?Xm:0,102!=(0|(bn=32|Um))){if((fn-(Vm=ga((Vm=Xm>>31)+Xm^Vm,0,fn))|0)<=1)for(;o[0|(Vm=Vm+-1|0)]=48,(fn-Vm|0)<2;);o[0|(hn=Vm+-2|0)]=Um,o[Vm+-1|0]=(0|Xm)<0?45:43,Vm=fn-hn|0}if(_(Sm,32,mn,$m=1+(Vm+($m+(an+jn|0)|0)|0)|0,Tm),Z(a,kn,jn),_(a,48,Rm,$m,65536^Tm),102==(0|bn)){for(Sm=16+Zm|8,Xm=16+Zm|9,Wm=Um=dn>>>0>>0?dn:Wm;;){if(Vm=ga(q[Wm>>2],0,Xm),(0|Um)!=(0|Wm)){if(!(Vm>>>0<=16+Zm>>>0))for(;o[0|(Vm=Vm+-1|0)]=48,16+Zm>>>0>>0;);}else(0|Vm)==(0|Xm)&&(o[24+Zm|0]=48,Vm=Sm);if(Z(a,Vm,Xm-Vm|0),!((Wm=Wm+4|0)>>>0<=dn>>>0))break}Ym&&Z(a,3875,1);p:if(!((0|an)<1|cn>>>0<=Wm>>>0))for(;;){if(16+Zm>>>0<(Vm=ga(q[Wm>>2],0,Xm))>>>0)for(;o[0|(Vm=Vm+-1|0)]=48,16+Zm>>>0>>0;);if(Z(a,Vm,(0|an)<9?an:9),an=an+-9|0,cn>>>0<=(Wm=Wm+4|0)>>>0)break p;if(!(0<(0|an)))break}_(a,48,an+9|0,9,0)}else{q:if(!((0|an)<0))for(Um=en?cn:Wm+4|0,Sm=16+Zm|8,dn=16+Zm|9,Xm=Wm;;){if((0|dn)==(0|(Vm=ga(q[Xm>>2],0,dn)))&&(o[24+Zm|0]=48,Vm=Sm),(0|Wm)!=(0|Xm)){if(!(Vm>>>0<=16+Zm>>>0))for(;o[0|(Vm=Vm+-1|0)]=48,16+Zm>>>0>>0;);}else Z(a,Vm,1),Vm=Vm+1|0,(0|an)<1&&!_m||Z(a,3875,1);if(Z(a,bn=Vm,(0|(Vm=dn-Vm|0))<(0|an)?Vm:an),an=an-Vm|0,Um>>>0<=(Xm=Xm+4|0)>>>0)break q;if(!(-1<(0|an)))break}_(a,48,an+18|0,18,0),Z(a,hn,fn-hn|0)}}return _(a,32,Rm,$m,8192^Tm),L=560+Zm|0,0|((0|$m)<(0|Rm)?Rm:$m)},n[12]=function(a,Il){a|=0;var Am=Il|=0;Il=q[Il>>2]+15&-16,q[Am>>2]=Il+16,Am=a,a=function(a,Il,Jl,$l){var fm,cm,am=0,bm=0,dm=0,em=0;return L=cm=L-32|0,am=(em=am=2147483647&$l)-1006698496|0,bm=am=(fm=bm=dm=Jl)>>>0<0?am+1|0:am,am=em-1140785152|0,(0|(am=dm>>>0<0?am+1|0:am))==(0|bm)&fm>>>0>>0|bm>>>0>>0?(am=$l<<4|Jl>>>28,Jl=Jl<<4|Il>>>28,134217728==(0|(dm=Il&=268435455))&1<=a>>>0|134217728>>0?(am=am+1073741824|0,(a=Jl+1|0)>>>0<1&&(am=am+1|0),bm=a):(am=am-(((bm=Jl)>>>0<0)+-1073741824|0)|0,a|134217728^dm||((a=bm+(1&bm)|0)>>>0>>0&&(am=am+1|0),bm=a))):(!dm&2147418112==(0|em)?!(a|Il):2147418112==(0|em)&dm>>>0<0|em>>>0<2147418112)?(am=2146435072,1140785151==((bm=0)|em)&4294967295>>0|1140785151>>0||(dm=em>>>16)>>>(am=0)<15249||(function(a,Il,Jl,Am,Bm,Cm){var Jm,Km,Hm=0,Im=0;64&Cm?(Il=31&(Jl=Cm-64|0),Il=32<=(63&Jl)>>>0?(Jl=0,Bm>>>Il):(Jl=Bm>>>Il,((1<>>Il),Bm=Am=0):Cm&&(Im=Bm,Hm=31&(Km=64-Cm|0),Km=32<=(63&Km)>>>0?(Im=Am<>>32-Hm|Im<>>0?(Hm=0,Jl>>>Il):(Hm=Jl>>>Il,((1<>>Il),Il|=Km,Jl=Hm|Im,Hm=Am,Am=31&Cm,Am=32<=(63&Cm)>>>0?(Im=0,Bm>>>Am):(Im=Bm>>>Am,((1<>>Am),Bm=Im),q[a>>2]=Il,q[4+a>>2]=Jl,q[8+a>>2]=Am,q[12+a>>2]=Bm}(cm,a,Il,Jl,am=65535&$l|65536,15361-dm|0),function(a,Il,Jl,Am,Bm,Cm){var Fm,Dm,Em=0;64&Cm?(Am=Il,Il=31&(Bm=Cm+-64|0),32<=(63&Bm)>>>0?(Bm=Am<>>32-Il|Jl<>>0?(Em=Dm<>>32-Am|Bm<>>0?(Cm=0,Am>>>=Bm):(Cm=Am>>>Bm,Am=((1<>>Bm),Am|=Dm,Bm=Cm|Em,Cm=Il,Il=31&Fm,Il=32<=(63&Fm)>>>0?(Em=Cm<>>32-Il|Jl<>2]=Il,q[4+a>>2]=Jl,q[8+a>>2]=Am,q[12+a>>2]=Bm}(16+cm|0,a,Il,Jl,am,dm+-15233|0),Jl=q[4+cm>>2],a=q[8+cm>>2],am=q[12+cm>>2]<<4|a>>>28,bm=a<<4|Jl>>>28,134217728==(0|(Jl=a=268435455&Jl))&1<=(Il=q[cm>>2]|(0!=(q[16+cm>>2]|q[24+cm>>2])|0!=(q[20+cm>>2]|q[28+cm>>2])))>>>0|134217728>>0?((a=bm+1|0)>>>0<1&&(am=am+1|0),bm=a):Il|134217728^Jl||((a=bm+(1&bm)|0)>>>0>>0&&(am=am+1|0),bm=a))):(bm=Jl<<4|Il>>>28,am=524287&(am=$l<<4|Jl>>>28)|2146959360),L=32+cm|0,f(0,0|bm),f(1,-2147483648&$l|am),+g()}(q[Il>>2],q[Il+4>>2],q[Il+8>>2],q[Il+12>>2]),v[Am>>3]=a},n[13]=function(a){return 0},n[14]=function(a,Il,Am){Il|=0,Am|=0;var Om,Cm,Bm=0,Lm=0,Mm=0,Nm=0;for(L=Cm=L-32|0,Bm=q[28+(a|=0)>>2],q[16+Cm>>2]=Bm,Mm=q[a+20>>2],q[28+Cm>>2]=Am,q[24+Cm>>2]=Il,Mm=(q[20+Cm>>2]=Il=Mm-Bm|0)+Am|0,Nm=2,Il=16+Cm|0;;){a:{if((Lm=(Bm=0)|K(q[a+60>>2],0|Il,0|Nm,12+Cm|0))&&(q[2086]=Lm,Bm=-1),(0|(Bm=Bm?q[12+Cm>>2]=-1:q[12+Cm>>2]))==(0|Mm))Il=q[a+44>>2],q[a+28>>2]=Il,q[a+20>>2]=Il,q[a+16>>2]=Il+q[a+48>>2],a=Am;else{if(-1<(0|Bm))break a;q[a+28>>2]=0,q[a+16>>2]=0,q[a+20>>2]=0,q[a>>2]=32|q[a>>2],2!=((a=0)|Nm)&&(a=Am-q[Il+4>>2]|0)}return L=32+Cm|0,0|a}Lm=q[Il+4>>2],q[(Il=(Om=Lm>>>0>>0)?Il+8|0:Il)>>2]=(Lm=Bm-(Om?Lm:0)|0)+q[Il>>2],q[Il+4>>2]=q[Il+4>>2]-Lm,Mm=Mm-Bm|0,Nm=Nm-Om|0}},n[15]=function(a,Il,Am,Bm){return M=0},{d:function(){},e:function(){return q[1805]},f:function(){return 83886080},g:function(){return 5},h:function(a,vj){return vj|=0,L=vj=L-16|0,a=(a|=0)?sa(a)?(Y(4,2150,0),0):r[a+4|0]:(q[vj+4>>2]=1444,q[vj>>2]=2267,Y(4,1294,vj),0),L=vj+16|0,0|a},i:function(a,vj){var wj;return vj|=0,L=wj=L-48|0,a=(a|=0)?(a+63&-64)!=(0|a)?(q[36+wj>>2]=1522,q[32+wj>>2]=2284,Y(4,1294,32+wj|0),0):(vj+63&-64)==(0|vj)&&vj?function(a,Vk){var pl,Wk=0,Xk=0,Yk=0,Zk=0,_k=0,$k=0,al=0,bl=0,cl=0,dl=0,el=0,fl=0,gl=0,hl=0,il=0,jl=0,kl=0,ll=0,ml=0,nl=0,ol=0;L=_k=(pl=Xk=L)-704&-64;a:if(Vk>>>0<=1343)Y(4,1235,0);else if(sa(a))Y(4,1469,0);else if(Xk=r[0|(nl=a+4|0)]){if(!(6<=Xk>>>0)){(jl=1==(0|!r[a+5|0]))||(da(nl,1),X(a- -64|0,4,160)),ca(_k- -64|0,0,640),na(a,_k- -64|0),Xk=a+Vk|0,Vk=q[_k+64>>2];b:{c:{d:{if(5<=(il=r[a+4|0])>>>0){if(Vk>>>0>>0|Xk>>>0>>0)break c;if((Zk=Vk+256|0)>>>0>>0)break c;if(Zk>>>0<=Xk>>>0)break d;break c}if(Vk>>>0>>0|Xk>>>0>>0)break c;if((Zk=Vk+128|0)>>>0>>0|Xk>>>0>>0)break c}if(!((Yk=q[_k+68>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Yk=Yk- -64|0)>>>0>>0|Xk>>>0>>0||(0|(dl=q[Vk>>2]))<0||(Zk=q[_k+72>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=(Wk=Zk)+(Zk=dl<<2)|0)>>>0>>0|Xk>>>0>>0||(al=q[_k+76>>2])>>>0>>0|Xk>>>0>>0|al>>>0>>0||(Wk=(dl<<6)+al|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+80>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+84>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+88>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+92>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+96>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+100>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Yk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(0|(Wk=q[Vk+4>>2]))<0||(Zk=q[_k+104>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||($k=(Yk=Zk)+(Zk=Wk<<2)|0)>>>0>>0|Xk>>>0<$k>>>0||(Yk=q[_k+108>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0<$k>>>0||(Wk=Yk+(Wk<<6)|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+112>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+116>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+120>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+124>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+128>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+132>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+136>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Yk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(0|(Wk=q[Vk+8>>2]))<0||(Zk=q[_k+140>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=(el=Wk<<2)+Zk|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+144>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=Zk+el|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+148>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=Zk+el|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+156>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=Zk+el|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+160>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=Zk+el|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+164>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=Zk+el|0)>>>0>>0|Xk>>>0>>0||(0|(Wk=q[Vk+12>>2]))<0||(Zk=q[_k+172>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=(fl=Wk<<2)+Zk|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+176>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=Zk+fl|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+180>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=Zk+fl|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+188>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Wk=Zk+fl|0)>>>0>>0|Xk>>>0>>0||(0|(Yk=q[Vk+16>>2]))<0||(Zk=q[_k+192>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||($k=(Wk=Zk)+(Zk=Yk<<2)|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+196>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Zk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+200>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Zk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+204>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Zk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+208>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+(Yk<<6)|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+212>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Zk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+216>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Zk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+220>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Zk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+228>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Zk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+232>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Zk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+236>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Zk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+240>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Zk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+244>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Zk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+248>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||(Wk=Wk+Yk|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+252>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+256>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+260>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+264>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+268>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+272>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(0|($k=q[Vk+20>>2]))<0||(Yk=q[_k+276>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(gl=(Wk=Yk)+(Yk=$k<<2)|0)>>>0>>0|Xk>>>0>>0||(Wk=q[_k+280>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||($k=Wk+($k<<6)|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+284>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Yk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+288>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Yk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+292>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Yk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+296>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Yk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+300>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Yk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+308>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Yk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+312>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Yk|0)>>>0>>0|Xk>>>0<$k>>>0||(0|(gl=q[Vk+24>>2]))<0||(Wk=q[_k+336>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+(gl<<2)|0)>>>0>>0|Xk>>>0<$k>>>0||(0|(gl=q[Vk+28>>2]))<0||(Wk=q[_k+340>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=(ll=gl<<2)+Wk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+344>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+ll|0)>>>0>>0|Xk>>>0<$k>>>0||(0|(gl=q[Vk+32>>2]))<0||(Wk=q[_k+356>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||(gl=($k=gl<<2)+Wk|0)>>>0>>0|Xk>>>0>>0||(Wk=q[_k+360>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(gl=Wk+$k|0)>>>0>>0|Xk>>>0>>0||(Wk=q[_k+364>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(gl=Wk+$k|0)>>>0>>0|Xk>>>0>>0||(Wk=q[_k+368>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(gl=Wk+$k|0)>>>0>>0|Xk>>>0>>0||(Wk=q[_k+372>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(gl=Wk+$k|0)>>>0>>0|Xk>>>0>>0||(Wk=q[_k+376>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(gl=Wk+$k|0)>>>0>>0|Xk>>>0>>0||(Wk=q[_k+380>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(gl=Wk+$k|0)>>>0>>0|Xk>>>0>>0||(0|(bl=q[Vk+36>>2]))<0||(Wk=q[_k+392>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(bl=(gl=bl<<2)+Wk|0)>>>0>>0|Xk>>>0>>0||(Wk=q[_k+396>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(bl=Wk+gl|0)>>>0>>0|Xk>>>0>>0||(Wk=q[_k+400>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(bl=Wk+gl|0)>>>0>>0|Xk>>>0>>0||(0|(cl=q[Vk+40>>2]))<0||(Wk=q[_k+412>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(bl=Wk+(cl<<2)|0)>>>0>>0|Xk>>>0>>0||(0|(cl=q[Vk+44>>2]))<0||(Wk=q[_k+424>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(bl=Wk+(cl<<2)|0)>>>0>>0|Xk>>>0>>0||(0|(cl=q[Vk+48>>2]))<0||(Wk=q[_k+428>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(bl=(cl<<=2)+Wk|0)>>>0>>0|Xk>>>0>>0||(Wk=q[_k+432>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(bl=Wk+cl|0)>>>0>>0|Xk>>>0>>0||(0|(cl=q[Vk+52>>2]))<0||(Wk=q[_k+416>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(bl=(cl<<=2)+Wk|0)>>>0>>0|Xk>>>0>>0||(Wk=q[_k+420>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(bl=Wk+cl|0)>>>0>>0|Xk>>>0>>0||(0|(cl=q[Vk+56>>2]))<0||(Wk=q[_k+552>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(bl=Wk+(cl<<2)|0)>>>0>>0|Xk>>>0>>0||(0|(cl=q[Vk+60>>2]))<0||(Wk=q[_k+556>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(bl=Wk+(cl<<2)|0)>>>0>>0|Xk>>>0>>0||(0|(cl=q[Vk+64>>2]))<0||(Wk=q[_k+560>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(bl=Wk+(cl<<1)|0)>>>0>>0|Xk>>>0>>0||(0|(cl=q[Vk+68>>2]))<0||(Wk=q[_k+564>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(bl=Wk+(cl<<2)|0)>>>0>>0|Xk>>>0>>0||(0|(cl=q[Vk+72>>2]))<0||(Wk=q[_k+568>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(cl=(bl=Wk)+(Wk=cl<<2)|0)>>>0>>0|Xk>>>0>>0||(bl=q[_k+572>>2])>>>0>>0|Xk>>>0>>0|bl>>>0>>0||(cl=Wk+bl|0)>>>0>>0|Xk>>>0>>0||(bl=q[_k+576>>2])>>>0>>0|Xk>>>0>>0|bl>>>0>>0||(cl=Wk+bl|0)>>>0>>0|Xk>>>0>>0||(bl=q[_k+580>>2])>>>0>>0|Xk>>>0>>0|bl>>>0>>0||(cl=Wk+bl|0)>>>0>>0|Xk>>>0>>0||(bl=q[_k+584>>2])>>>0>>0|Xk>>>0>>0|bl>>>0>>0||(bl=Wk+bl|0)>>>0>>0|Xk>>>0>>0||(0|(cl=q[Vk+76>>2]))<0||(Wk=q[_k+588>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(cl=(bl=cl<<2)+Wk|0)>>>0>>0|Xk>>>0>>0||(Wk=q[_k+592>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(cl=Wk+bl|0)>>>0>>0|Xk>>>0>>0||(Wk=q[_k+596>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(bl=Wk+bl|0)>>>0>>0|Xk>>>0>>0||(0|(cl=q[Vk+80>>2]))<0||(Wk=q[_k+600>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(hl=(bl=Wk)+(Wk=cl<<2)|0)>>>0>>0|Xk>>>0>>0||(bl=q[_k+604>>2])>>>0>>0|Xk>>>0>>0|bl>>>0>>0||(cl=bl+(cl<<6)|0)>>>0>>0|Xk>>>0>>0||(bl=q[_k+608>>2])>>>0>>0|Xk>>>0>>0|bl>>>0>>0||(cl=Wk+bl|0)>>>0>>0|Xk>>>0>>0||(bl=q[_k+612>>2])>>>0>>0|Xk>>>0>>0|bl>>>0>>0||(cl=Wk+bl|0)>>>0>>0|Xk>>>0>>0||(bl=q[_k+616>>2])>>>0>>0|Xk>>>0>>0|bl>>>0>>0||(cl=Wk+bl|0)>>>0>>0|Xk>>>0>>0||(bl=q[_k+620>>2])>>>0>>0|Xk>>>0>>0|bl>>>0>>0||(cl=Wk+bl|0)>>>0>>0|Xk>>>0>>0||(bl=q[_k+624>>2])>>>0>>0|Xk>>>0>>0|bl>>>0>>0||(cl=Wk+bl|0)>>>0>>0|Xk>>>0>>0||(bl=q[_k+628>>2])>>>0>>0|Xk>>>0>>0|bl>>>0>>0||(cl=Wk+bl|0)>>>0>>0|Xk>>>0>>0||(bl=q[_k+632>>2])>>>0>>0|Xk>>>0>>0|bl>>>0>>0||(bl=Wk+bl|0)>>>0>>0|Xk>>>0>>0||(0|(cl=q[Vk+84>>2]))<0||(Wk=q[_k+636>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(bl=Wk+(cl<<2)|0)>>>0>>0|Xk>>>0>>0||(Wk=q[_k+640>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(bl=Wk+(cl<<1)|0)>>>0>>0|Xk>>>0>>0||(0|(cl=q[Vk+88>>2]))<0||(Wk=q[_k+644>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(Wk=Wk+(cl<<2)|0)>>>0>>0|Xk>>>0>>0)){if(!(il>>>0<2)){if((bl=q[_k+168>>2])>>>0>>0|Xk>>>0>>0|bl>>>0>>0)break c;if((Wk=bl+el|0)>>>0>>0|Xk>>>0>>0)break c;if(!(il>>>0<4)){if((bl=q[_k+324>>2])>>>0>>0|Xk>>>0>>0|bl>>>0>>0)break c;if((bl=Yk+bl|0)>>>0>>0|Xk>>>0>>0)break c;if((Wk=q[_k+328>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0)break c;if((bl=Wk+Yk|0)>>>0>>0|Xk>>>0>>0)break c;if((Wk=q[_k+332>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0)break c;if((bl=Wk+Yk|0)>>>0>>0|Xk>>>0>>0)break c;if((Wk=q[_k+152>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0)break c;if((el=Wk+el|0)>>>0>>0|Xk>>>0>>0)break c;if((Wk=q[_k+184>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0)break c;if((el=Wk+fl|0)>>>0>>0|Xk>>>0>>0)break c;if((Wk=q[_k+224>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0)break c;if((Wk=Wk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((0|(el=q[Vk+92>>2]))<0)break c;if((Zk=q[_k+648>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((el=(Wk=el<<2)+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Zk=q[_k+652>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((el=Wk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Zk=q[_k+656>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Wk=Wk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((0|(el=q[Vk+96>>2]))<0)break c;if((Zk=q[_k+660>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((el=(Wk=el<<2)+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Zk=q[_k+664>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((el=Wk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Zk=q[_k+668>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Wk=Wk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Zk=q[_k+304>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Zk=q[_k+316>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Zk=q[_k+320>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Yk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((0|(Wk=q[Vk+100>>2]))<0)break c;if((Zk=q[_k+436>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Wk=(Yk=Wk<<2)+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Zk=q[_k+440>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Zk=q[_k+444>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Yk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((0|(Wk=q[Vk+104>>2]))<0)break c;if((Zk=q[_k+448>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Wk=(Yk=Zk)+(Zk=Wk<<2)|0)>>>0>>0|Xk>>>0>>0)break c;if((Yk=q[_k+452>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0)break c;if((Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Yk=q[_k+456>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0)break c;if((Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Yk=q[_k+460>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0)break c;if((Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Yk=q[_k+464>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0)break c;if((Yk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((0|(Wk=q[Vk+108>>2]))<0)break c;if((Zk=q[_k+480>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Wk=(Yk=Wk<<2)+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Zk=q[_k+484>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Zk=q[_k+488>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Yk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((0|(Wk=q[Vk+112>>2]))<0)break c;if((Zk=q[_k+504>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Wk=(Yk=Wk<<2)+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Zk=q[_k+508>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Zk=q[_k+512>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Yk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((0|(Wk=q[Vk+116>>2]))<0)break c;if((Zk=q[_k+528>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Yk=Zk+(Wk<<2)|0)>>>0>>0|Xk>>>0>>0)break c;if((0|(Wk=q[Vk+120>>2]))<0)break c;if((Zk=q[_k+532>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Wk=(Yk=Wk<<2)+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Zk=q[_k+536>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Zk=q[_k+540>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Yk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((0|(Wk=q[Vk+124>>2]))<0)break c;if((Zk=q[_k+544>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Yk=(Wk<<=2)+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Zk=q[_k+548>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Wk=Wk+Zk|0)>>>0>>0|Xk>>>0>>0)break c}}if(il>>>0<5)break b;if(!((Zk=q[_k+348>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=Zk+ll|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+352>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=Zk+ll|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+384>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=Zk+$k|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+388>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=Zk+$k|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+404>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=Zk+gl|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+408>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=Zk+gl|0)>>>0>>0|Xk>>>0>>0||(0|(Wk=q[Vk+128>>2]))<0||(Zk=q[_k+468>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Wk=(Yk=Wk<<2)+Zk|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+472>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+476>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(0|(Wk=q[Vk+132>>2]))<0||(Zk=q[_k+492>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Wk=(Yk=Wk<<2)+Zk|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+496>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+500>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(0|(Wk=q[Vk+136>>2]))<0||(Zk=q[_k+516>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Wk=(Yk=Wk<<2)+Zk|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+520>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+524>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Zk=Yk+Zk|0)>>>0>>0)&&Zk>>>0<=Xk>>>0)break b}}Y(4,1760,0),da(nl,1),X(a- -64|0,4,160);break a}jl||(ya(a),o[a+5|0]=0,Vk=q[_k+64>>2],dl=q[Vk>>2],al=q[_k+76>>2],il=r[a+4|0]);f:{if((a=0)<(0|dl)){for(;;){if(63>>0)break f;if((0|dl)==(0|(a=a+1|0)))break}if(Wk=Vk+48|0,(Xk=0)<(0|(a=q[Vk>>2]))){for(Zk=q[Vk+48>>2],Yk=q[_k+80>>2];;){if((0|(al=q[Yk+(Xk<<2)>>2]))<0|(0|Zk)<=(0|al))break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(gl=Vk+24|0,Zk=q[Vk+24>>2],$k=q[_k+88>>2],dl=q[_k+84>>2],Xk=0;;){if(Yk=q[(al=Xk<<2)+$k>>2]){if((0|Yk)<0|(0|Zk)<(0|Yk))break f;if((0|(al=q[al+dl>>2]))<0|(0|Zk)<=(0|al))break f;if((Yk=Yk+al|0)>>>31|(0|Zk)<(0|Yk))break f}if((0|a)==(0|(Xk=Xk+1|0)))break}for(Xk=0,Zk=q[_k+92>>2];;){if(1>2])break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(Xk=0,Zk=q[_k+96>>2];;){if(1>2])break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(Xk=0,Zk=q[_k+100>>2];;){if((0|(Yk=q[Zk+(Xk<<2)>>2]))<-1|(0|a)<=(0|Yk))break f;if((0|a)==(0|(Xk=Xk+1|0)))break}}else gl=Vk+24|0}else gl=Vk+24|0,Wk=Vk+48|0;if((a=0)<(0|(Xk=q[Vk+4>>2]))){for(Zk=q[_k+108>>2];;){if(63>>0)break f;if((0|Xk)==(0|(a=a+1|0)))break}if($k=(Zk=q[Vk+48>>2])+-1|0,!(((Xk=0)|(a=q[Vk+4>>2]))<=0)){for(Yk=q[_k+112>>2];;){if((0|(al=q[Yk+(Xk<<2)>>2]))<0|(0|Zk)<=(0|al))break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(Xk=0,Zk=q[_k+116>>2];;){if(1>2])break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(Xk=0,Zk=q[_k+120>>2];;){if(1>2])break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(Zk=q[Vk>>2],Xk=0,Yk=q[_k+124>>2];;){if((0|(al=q[Yk+(Xk<<2)>>2]))<-1|(0|Zk)<=(0|al))break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(Xk=0,Zk=q[_k+128>>2];;){if((0|(Yk=q[Zk+(Xk<<2)>>2]))<-1|(0|a)<=(0|Yk))break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(Xk=0,Zk=q[_k+132>>2];;){if(1>2])break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(Yk=Vk+8|0,al=Vk+12|0,dl=q[_k+136>>2],Xk=0;;){if(1<(fl=q[(el=Xk<<2)+Zk>>2])>>>0)break f;if((0|(el=q[dl+el>>2]))<0|(0|el)>=q[(fl-1|0?Yk:al)>>2])break f;if((0|a)==(0|(Xk=Xk+1|0)))break}}}else $k=q[Wk>>2]+-1|0;if((a=0)<(0|(Xk=q[Vk+8>>2]))){for(Zk=q[_k+140>>2];;){if((0|(Yk=q[Zk+(a<<2)>>2]))<0|(0|$k)<(0|Yk))break f;if((0|Xk)==(0|(a=a+1|0)))break}for(ll=Vk+28|0,Zk=q[Vk+28>>2],dl=q[_k+148>>2],el=q[_k+144>>2],a=0;;){if(Yk=q[(al=a<<2)+dl>>2]){if((0|Yk)<0|(0|Zk)<(0|Yk))break f;if((0|(al=q[al+el>>2]))<0|(0|Zk)<=(0|al))break f;if((Yk=Yk+al|0)>>>31|(0|Zk)<(0|Yk))break f}if((0|Xk)==(0|(a=a+1|0)))break}for(a=0,Yk=q[_k+156>>2],al=q[_k+164>>2],dl=q[_k+160>>2];;){if((0|(el=q[(Zk=a<<2)+dl>>2]))<1)break f;if((0|(fl=q[Zk+al>>2]))<1)break f;if((0|(Zk=q[Yk+Zk>>2]))<1|(0|Zk)!=(0|w(fl+1|0,el+1|0)))break f;if((0|Xk)==(0|(a=a+1|0)))break}}else ll=Vk+28|0;if((a=0)<(0|(Yk=q[Vk+12>>2]))){for(Xk=q[_k+172>>2];;){if((0|(Zk=q[Xk+(a<<2)>>2]))<0|(0|$k)<(0|Zk))break f;if((0|Yk)==(0|(a=a+1|0)))break}for(bl=Vk+32|0,Xk=q[Vk+32>>2],$k=q[_k+180>>2],dl=q[_k+176>>2],a=0;;){if(Zk=q[(al=a<<2)+$k>>2]){if((0|Zk)<0|(0|Xk)<(0|Zk))break f;if((0|(al=q[al+dl>>2]))<0|(0|Xk)<=(0|al))break f;if((Zk=Zk+al|0)>>>31|(0|Xk)<(0|Zk))break f}if((0|Yk)==(0|(a=a+1|0)))break}}else bl=Vk+32|0;Zk=Vk+16|0;m:{n:{if(!(((a=0)|(Xk=q[Vk+16>>2]))<=0)){for(Yk=q[_k+208>>2];;){if(63>>0)break f;if((0|Xk)==(0|(a=a+1|0)))break}if(!(((Xk=0)|(a=q[Zk>>2]))<=0)){for(Yk=q[Wk>>2],al=q[_k+212>>2];;){if((0|($k=q[al+(Xk<<2)>>2]))<0|(0|Yk)<=(0|$k))break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(nl=Vk+36|0,Yk=q[Vk+36>>2],dl=q[_k+220>>2],el=q[_k+216>>2],Xk=0;;){if(al=q[($k=Xk<<2)+dl>>2]){if((0|al)<0|(0|Yk)<(0|al))break f;if((0|($k=q[$k+el>>2]))<0|(0|Yk)<=(0|$k))break f;if((al=al+$k|0)>>>31|(0|Yk)<(0|al))break f}if((0|a)==(0|(Xk=Xk+1|0)))break}for(Xk=0,Yk=q[_k+228>>2];;){if(1>2])break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(Xk=0,Yk=q[_k+232>>2];;){if(1>2])break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(Yk=q[Vk>>2],Xk=0,al=q[_k+236>>2];;){if((0|($k=q[al+(Xk<<2)>>2]))<-1|(0|Yk)<=(0|$k))break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(Yk=q[Vk+4>>2],Xk=0,al=q[_k+240>>2];;){if((0|($k=q[al+(Xk<<2)>>2]))<-1|(0|Yk)<=(0|$k))break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(Yk=q[_k+244>>2],Xk=0;;){if(q[Yk+(Xk<<2)>>2]<0)break f;if((0|a)==(0|(Xk=Xk+1|0)))break}break n}}al=Vk+68|0,nl=Vk+36|0;break m}for(Yk=q[_k+252>>2],Xk=0;;){if(q[Yk+(Xk<<2)>>2]<0)break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(al=q[Vk+60>>2],Xk=0,$k=q[_k+256>>2];;){if((dl=q[(dl=Xk<<2)+$k>>2]+(q[Yk+dl>>2]<<1)|0)>>>31|(0|al)<(0|dl))break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(Yk=q[Vk+64>>2],dl=q[_k+264>>2],el=q[_k+260>>2],Xk=0;;){if(al=q[($k=Xk<<2)+dl>>2]){if((0|al)<0|(0|Yk)<(0|al))break f;if((0|($k=q[$k+el>>2]))<0|(0|Yk)<=(0|$k))break f;if((al=al+$k|0)>>>31|(0|Yk)<(0|al))break f}if((0|a)==(0|(Xk=Xk+1|0)))break}for(al=Vk+68|0,Yk=q[Vk+68>>2],el=q[_k+272>>2],fl=q[_k+268>>2],Xk=0;;){if($k=q[(dl=Xk<<2)+el>>2]){if((0|$k)<0|(0|Yk)<(0|$k))break f;if((0|(dl=q[dl+fl>>2]))<0|(0|Yk)<=(0|dl))break f;if(($k=$k+dl|0)>>>31|(0|Yk)<(0|$k))break f}if((0|a)==(0|(Xk=Xk+1|0)))break}}p:{q:{if(!(((a=0)|(Xk=q[Vk+20>>2]))<=0)){for(Yk=q[_k+280>>2];;){if(63>>0)break f;if((0|Xk)==(0|(a=a+1|0)))break}if(!(((a=0)|(Xk=q[Vk+20>>2]))<=0)){for(Yk=q[_k+296>>2];;){if(1>2])break f;if((0|Xk)==(0|(a=a+1|0)))break}for(Yk=q[_k+300>>2],a=0;;){if(q[Yk+(a<<2)>>2]<0)break f;if((0|Xk)==(0|(a=a+1|0)))break}break q}}a=q[Vk+52>>2];break p}for(a=q[Vk+52>>2],el=q[_k+312>>2],fl=q[_k+308>>2],$k=0;;){if(Yk=q[(dl=$k<<2)+el>>2]){if((0|Yk)<0|(0|a)<(0|Yk))break f;if((0|(dl=q[dl+fl>>2]))<0|(0|a)<=(0|dl))break f;if((Yk=Yk+dl|0)>>>31|(0|a)<(0|Yk))break f}if((0|Xk)==(0|($k=$k+1|0)))break}}if(Yk=q[Vk+40>>2],(Xk=0)<(0|($k=q[Vk+8>>2])))for(dl=q[_k+344>>2],el=q[_k+156>>2];;){if((fl=q[(fl=Xk<<2)+dl>>2]+(q[el+fl>>2]<<1)|0)>>>31|(0|Yk)<(0|fl))break f;if((0|$k)==(0|(Xk=Xk+1|0)))break}if((Xk=0)<(0|($k=q[bl>>2]))){for(dl=q[_k+376>>2];;){if(1>2])break f;if((0|$k)==(0|(Xk=Xk+1|0)))break}for(Xk=0,dl=q[_k+380>>2];;){if(1>2])break f;if((0|$k)==(0|(Xk=Xk+1|0)))break}}if((Xk=0)<(0|($k=q[Zk>>2])))for(dl=q[_k+400>>2],el=q[_k+252>>2];;){if((fl=q[(fl=Xk<<2)+dl>>2]+(q[el+fl>>2]<<1)|0)>>>31|(0|Yk)<(0|fl))break f;if((0|$k)==(0|(Xk=Xk+1|0)))break}if((Xk=0)<(0|(Yk=q[Vk+44>>2])))for(dl=q[_k+424>>2];;){if((0|(el=q[dl+(Xk<<2)>>2]))<0|(0|a)<=(0|el))break f;if((0|Yk)==(0|(Xk=Xk+1|0)))break}if(1<=(0|(el=q[Wk>>2])))for(Xk=0,fl=q[_k+432>>2],cl=q[_k+428>>2];;){if(Wk=q[(dl=Xk<<2)+fl>>2]){if((0|Wk)<0|(0|Yk)<(0|Wk))break f;if((0|(dl=q[cl+dl>>2]))<0|(0|Yk)<=(0|dl))break f;if((Wk=Wk+dl|0)>>>31|(0|Yk)<(0|Wk))break f}if((0|el)==(0|(Xk=Xk+1|0)))break}if(1<=(0|a))for(Yk=q[Vk+56>>2],Xk=0,el=q[_k+420>>2],fl=q[_k+416>>2];;){if(Wk=q[(dl=Xk<<2)+el>>2]){if((0|Wk)<0|(0|Yk)<(0|Wk))break f;if((0|(dl=q[dl+fl>>2]))<0|(0|Yk)<=(0|dl))break f;if((Wk=Wk+dl|0)>>>31|(0|Yk)<(0|Wk))break f}if((0|(Xk=Xk+1|0))==(0|a))break}if((a=0)<(0|(Xk=q[al>>2])))for(Yk=q[_k+564>>2];;){if((0|(al=q[Yk+(a<<2)>>2]))<-1|(0|$k)<=(0|al))break f;if((0|Xk)==(0|(a=a+1|0)))break}if(a=q[Vk+76>>2],1<=(0|(al=q[Vk+72>>2])))for(Xk=0,$k=q[_k+572>>2],dl=q[_k+568>>2];;){if(Yk=q[(Wk=Xk<<2)+$k>>2]){if((0|Yk)<0|(0|a)<(0|Yk))break f;if((0|(Wk=q[Wk+dl>>2]))<0|(0|a)<=(0|Wk))break f;if((Yk=Wk+Yk|0)>>>31|(0|a)<(0|Yk))break f}if((0|al)==(0|(Xk=Xk+1|0)))break}if((Xk=0)<(0|a)){for(Yk=q[_k+588>>2];;){if(1>2])break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(Wk=q[_k+592>>2],Xk=0;;){if(1<(dl=q[($k=Xk<<2)+Yk>>2])>>>0)break f;if((0|($k=q[Wk+$k>>2]))<0|(0|$k)>=q[(dl-1|0?Zk:Vk)>>2])break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(Xk=0,Yk=q[_k+596>>2];;){if((0|(Wk=q[Yk+(Xk<<2)>>2]))<-1|(0|al)<=(0|Wk))break f;if((0|a)==(0|(Xk=Xk+1|0)))break}}s:{if(!(((a=0)|($k=q[Vk+80>>2]))<=0)){for(Xk=q[_k+604>>2];;){if(63>>0)break f;if((0|$k)==(0|(a=a+1|0)))break}if(!(((a=0)|($k=q[Vk+80>>2]))<=0)){for(Xk=q[Vk+48>>2],Yk=q[_k+608>>2];;){if((0|(al=q[Yk+(a<<2)>>2]))<0|(0|Xk)<=(0|al))break f;if((0|$k)==(0|(a=a+1|0)))break}for(el=q[Vk+88>>2],al=q[_k+616>>2],Wk=q[_k+612>>2],a=0;;){if(Xk=q[(Yk=a<<2)+al>>2]){if((0|Xk)<0|(0|el)<(0|Xk))break f;if((0|(Yk=q[Wk+Yk>>2]))<0|(0|el)<=(0|Yk))break f;if((Xk=Xk+Yk|0)>>>31|(0|el)<(0|Xk))break f}if((0|$k)==(0|(a=a+1|0)))break}for(Zk=q[Zk>>2],al=q[_k+620>>2],a=0;;){if((0|(Xk=q[al+(a<<2)>>2]))<0|(0|Zk)<=(0|Xk))break f;if((0|$k)==(0|(a=a+1|0)))break}for(Wk=q[_k+624>>2],a=0;;){if((0|(Xk=q[Wk+(a<<2)>>2]))<0|(0|Zk)<=(0|Xk))break f;if((0|$k)==(0|(a=a+1|0)))break}for(Xk=q[Vk+84>>2],dl=q[_k+632>>2],fl=q[_k+628>>2],a=0;;){if(Yk=q[(cl=a<<2)+dl>>2]){if((0|Yk)<0|(0|Xk)<(0|Yk))break f;if((0|(cl=q[cl+fl>>2]))<0|(0|Xk)<=(0|cl))break f;if((Yk=Yk+cl|0)>>>31|(0|Xk)<(0|Yk))break f}if((0|$k)==(0|(a=a+1|0)))break}for(hl=q[_k+640>>2],Xk=q[_k+252>>2],Yk=0;;){if(0<(0|(jl=q[(a=Yk<<2)+dl>>2])))for(cl=hl+(q[a+fl>>2]<<1)|0,ol=q[Xk+(q[a+Wk>>2]<<2)>>2],kl=q[Xk+(q[a+al>>2]<<2)>>2],a=0;;){if((0|ol)<=s[cl+(2|(ml=a<<1))>>1]|(0|kl)<=s[cl+ml>>1])break f;if(!((0|(a=a+2|0))<(0|jl)))break}if((0|$k)==(0|(Yk=Yk+1|0)))break}break s}}Zk=q[Vk+16>>2],el=q[Vk+88>>2]}if(!((255&il)>>>0<2)){if((a=0)<(0|(dl=q[Vk+8>>2])))for(Xk=q[_k+168>>2];;){if(1>2])break f;if((0|dl)==(0|(a=a+1|0)))break}if(!((255&il)>>>0<4)){if(al=q[Vk+56>>2],1<=(0|(fl=q[Vk+20>>2])))for(Wk=q[_k+332>>2],cl=q[_k+328>>2],a=0;;){if(Xk=q[(Yk=a<<2)+Wk>>2]){if((0|Xk)<0|(0|al)<(0|Xk))break f;if((0|(Yk=q[Yk+cl>>2]))<0|(0|al)<=(0|Yk))break f;if((Xk=Xk+Yk|0)>>>31|(0|al)<(0|Xk))break f}if((0|fl)==(0|(a=a+1|0)))break}if((0|(a=q[Vk+92>>2]))!=q[Vk+96>>2])break f;if(1<=(0|dl))for(cl=q[_k+152>>2],Xk=0,hl=q[_k+148>>2];;){if(Yk=q[(Wk=Xk<<2)+hl>>2]){if((0|Yk)<0|(0|a)<(0|Yk))break f;if((0|(Wk=q[Wk+cl>>2]))<0|(0|a)<=(0|Wk))break f;if((Yk=Wk+Yk|0)>>>31|(0|a)<(0|Yk))break f}if((0|dl)==(0|(Xk=Xk+1|0)))break}if(1<=(0|(ol=q[Vk+12>>2])))for(cl=q[_k+184>>2],Xk=0,hl=q[_k+180>>2];;){if(Yk=q[(Wk=Xk<<2)+hl>>2]){if((0|Yk)<0|(0|a)<(0|Yk))break f;if((0|(Wk=q[Wk+cl>>2]))<0|(0|a)<=(0|Wk))break f;if((Yk=Wk+Yk|0)>>>31|(0|a)<(0|Yk))break f}if((0|ol)==(0|(Xk=Xk+1|0)))break}if(1<=(0|Zk))for(cl=q[_k+224>>2],Xk=0,hl=q[_k+220>>2];;){if(Yk=q[(Wk=Xk<<2)+hl>>2]){if((0|Yk)<0|(0|a)<(0|Yk))break f;if((0|(Wk=q[Wk+cl>>2]))<0|(0|a)<=(0|Wk))break f;if((Yk=Wk+Yk|0)>>>31|(0|a)<(0|Yk))break f}if((0|Zk)==(0|(Xk=Xk+1|0)))break}if((Xk=0)<(0|fl)){for(Yk=q[_k+304>>2];;){if(1>2])break f;if((0|fl)==(0|(Xk=Xk+1|0)))break}for(Yk=q[Vk+100>>2],hl=q[_k+320>>2],jl=q[_k+316>>2],Xk=0;;){if(Wk=q[(cl=Xk<<2)+hl>>2]){if((0|Wk)<0|(0|Yk)<(0|Wk))break f;if((0|(cl=q[cl+jl>>2]))<0|(0|Yk)<=(0|cl))break f;if((Wk=Wk+cl|0)>>>31|(0|Yk)<(0|Wk))break f}if((0|fl)==(0|(Xk=Xk+1|0)))break}}else Yk=q[Vk+100>>2];if(1<=(0|Yk)){for(cl=q[_k+440>>2],Xk=0,jl=q[_k+436>>2];;){if(Wk=q[(hl=Xk<<2)+cl>>2]){if((0|Wk)<0|(0|al)<(0|Wk))break f;if((0|(hl=q[hl+jl>>2]))<0|(0|al)<=(0|hl))break f;if((Wk=Wk+hl|0)>>>31|(0|al)<(0|Wk))break f}if((0|Yk)==(0|(Xk=Xk+1|0)))break}for(al=q[_k+444>>2],Xk=0;;){if((0|(hl=q[(Wk=Xk<<2)+al>>2]))<0|(0|hl)>=q[Wk+cl>>2])break f;if((0|Yk)==(0|(Xk=Xk+1|0)))break}}if((al=0)<(0|(Xk=q[Vk+104>>2]))){for(Wk=q[_k+448>>2];;){if((0|(cl=q[Wk+(al<<2)>>2]))<0|(0|Yk)<=(0|cl))break f;if((0|Xk)==(0|(al=al+1|0)))break}for(Wk=q[Vk+116>>2],hl=q[_k+464>>2],jl=q[_k+460>>2],Yk=0;;){if(al=q[(cl=Yk<<2)+hl>>2]){if((0|al)<0|(0|Wk)<(0|al))break f;if((0|(cl=q[cl+jl>>2]))<0|(0|Wk)<=(0|cl))break f;if((al=al+cl|0)>>>31|(0|Wk)<(0|al))break f}if((0|Xk)==(0|(Yk=Yk+1|0)))break}}else Wk=q[Vk+116>>2];if((Yk=0)<(0|(cl=q[Vk+108>>2]))){for(al=q[_k+480>>2];;){if((0|(hl=q[al+(Yk<<2)>>2]))<0|(0|dl)<=(0|hl))break f;if((0|cl)==(0|(Yk=Yk+1|0)))break}for(hl=q[_k+488>>2],kl=q[_k+484>>2],Yk=0;;){if(al=q[(dl=Yk<<2)+hl>>2]){if((0|al)<0|(0|Xk)<(0|al))break f;if((0|(dl=q[dl+kl>>2]))<0|(0|Xk)<=(0|dl))break f;if((al=al+dl|0)>>>31|(0|Xk)<(0|al))break f}if((0|cl)==(0|(Yk=Yk+1|0)))break}for(hl=q[ll>>2],Yk=q[_k+456>>2],dl=q[_k+452>>2],al=0;;){if(ml=q[kl+(al<<2)>>2]<<2,jl=q[ml+Yk>>2]){if((0|jl)<0|(0|hl)<(0|jl))break f;if((0|(ml=q[dl+ml>>2]))<0|(0|hl)<=(0|ml))break f;if((0|(jl=jl+ml|0))<0|(0|hl)<(0|jl))break f}if((0|cl)==(0|(al=al+1|0)))break}}else Yk=q[_k+456>>2],dl=q[_k+452>>2];if((al=0)<(0|(cl=q[Vk+112>>2]))){for(hl=q[_k+504>>2];;){if((0|(jl=q[hl+(al<<2)>>2]))<0|(0|Zk)<=(0|jl))break f;if((0|cl)==(0|(al=al+1|0)))break}for(kl=q[_k+512>>2],jl=q[_k+508>>2],Zk=0;;){if(al=q[(hl=Zk<<2)+kl>>2]){if((0|al)<0|(0|Xk)<(0|al))break f;if((0|(hl=q[hl+jl>>2]))<0|(0|Xk)<=(0|hl))break f;if((al=al+hl|0)>>>31|(0|Xk)<(0|al))break f}if((0|cl)==(0|(Zk=Zk+1|0)))break}for(al=q[nl>>2],Zk=0;;){if(kl=q[jl+(Zk<<2)>>2]<<2,hl=q[kl+Yk>>2]){if((0|hl)<0|(0|al)<(0|hl))break f;if((0|(kl=q[dl+kl>>2]))<0|(0|al)<=(0|kl))break f;if((0|(hl=hl+kl|0))<0|(0|al)<(0|hl))break f}if((0|cl)==(0|(Zk=Zk+1|0)))break}}if(al=q[Vk+120>>2],(Zk=0)<(0|Wk))for(cl=q[_k+528>>2];;){if((0|(hl=q[cl+(Zk<<2)>>2]))<0|(0|al)<=(0|hl))break f;if((0|(Zk=Zk+1|0))==(0|Wk))break}if((Zk=0)<(0|al)){for(Wk=q[_k+532>>2];;){if((0|(cl=q[Wk+(Zk<<2)>>2]))<-1|(0|fl)<=(0|cl))break f;if((0|al)==(0|(Zk=Zk+1|0)))break}for(Wk=q[Vk+124>>2],hl=q[_k+540>>2],jl=q[_k+536>>2],Zk=0;;){if(fl=q[(cl=Zk<<2)+hl>>2]){if((0|fl)<0|(0|Wk)<(0|fl))break f;if((0|(cl=q[cl+jl>>2]))<0|(0|Wk)<=(0|cl))break f;if((fl=cl+fl|0)>>>31|(0|Wk)<(0|fl))break f}if((0|al)==(0|(Zk=Zk+1|0)))break}}if(!((255&il)>>>0<5)){if((Zk=0)<(0|(il=q[ll>>2]))){for(al=q[_k+348>>2];;){if((0|(Wk=q[al+(Zk<<2)>>2]))<0|(0|a)<(0|Wk))break f;if((0|il)==(0|(Zk=Zk+1|0)))break}for(al=q[_k+352>>2],Zk=0;;){if((0|(Wk=q[al+(Zk<<2)>>2]))<0|(0|a)<(0|Wk))break f;if((0|il)==(0|(Zk=Zk+1|0)))break}}if((il=0)<(0|(Zk=q[bl>>2]))){for(al=q[_k+384>>2];;){if((0|(Wk=q[al+(il<<2)>>2]))<0|(0|a)<(0|Wk))break f;if((0|Zk)==(0|(il=il+1|0)))break}for(al=q[_k+388>>2],il=0;;){if((0|(Wk=q[al+(il<<2)>>2]))<0|(0|a)<(0|Wk))break f;if((0|Zk)==(0|(il=il+1|0)))break}}if((il=0)<(0|(al=q[nl>>2]))){for(Wk=q[_k+404>>2];;){if((0|(fl=q[Wk+(il<<2)>>2]))<0|(0|a)<(0|fl))break f;if((0|al)==(0|(il=il+1|0)))break}for(Wk=q[_k+408>>2],il=0;;){if((0|(fl=q[Wk+(il<<2)>>2]))<0|(0|a)<(0|fl))break f;if((0|al)==(0|(il=il+1|0)))break}}if((a=0)<(0|(il=q[Vk+128>>2]))){for(al=q[Vk>>2],Wk=q[_k+468>>2];;){if((0|(fl=q[Wk+(a<<2)>>2]))<0|(0|al)<=(0|fl))break f;if((0|il)==(0|(a=a+1|0)))break}for(ll=q[_k+476>>2],fl=q[_k+472>>2],a=0;;){if(al=q[(Wk=a<<2)+ll>>2]){if((0|al)<0|(0|Xk)<(0|al))break f;if((0|(Wk=q[Wk+fl>>2]))<0|(0|Xk)<=(0|Wk))break f;if((al=Wk+al|0)>>>31|(0|Xk)<(0|al))break f}if((0|il)==(0|(a=a+1|0)))break}for(al=q[gl>>2],a=0;;){if(gl=q[fl+(a<<2)>>2]<<2,Wk=q[gl+Yk>>2]){if((0|Wk)<0|(0|al)<(0|Wk))break f;if((0|(gl=q[dl+gl>>2]))<0|(0|al)<=(0|gl))break f;if((0|(Wk=Wk+gl|0))<0|(0|al)<(0|Wk))break f}if((0|il)==(0|(a=a+1|0)))break}}if((a=0)<(0|(il=q[Vk+132>>2]))){for(al=q[_k+492>>2];;){if((0|(Wk=q[al+(a<<2)>>2]))<0|(0|ol)<=(0|Wk))break f;if((0|il)==(0|(a=a+1|0)))break}for(gl=q[_k+500>>2],Wk=q[_k+496>>2],a=0;;){if(al=q[(fl=a<<2)+gl>>2]){if((0|al)<0|(0|Xk)<(0|al))break f;if((0|(fl=q[Wk+fl>>2]))<0|(0|Xk)<=(0|fl))break f;if((al=al+fl|0)>>>31|(0|Xk)<(0|al))break f}if((0|il)==(0|(a=a+1|0)))break}for(a=0;;){if(fl=q[Wk+(a<<2)>>2]<<2,al=q[fl+Yk>>2]){if((0|al)<0|(0|Zk)<(0|al))break f;if((0|(fl=q[dl+fl>>2]))<0|(0|Zk)<=(0|fl))break f;if((0|(al=al+fl|0))<0|(0|Zk)<(0|al))break f}if((0|il)==(0|(a=a+1|0)))break}}if(!(((a=0)|(Vk=q[Vk+136>>2]))<=0)){for(Zk=q[_k+516>>2];;){if((0|(il=q[Zk+(a<<2)>>2]))<0|(0|$k)<=(0|il))break f;if((0|Vk)==(0|(a=a+1|0)))break}for(al=q[_k+524>>2],Zk=q[_k+520>>2],a=0;;){if(_k=q[(il=a<<2)+al>>2]){if((0|_k)<0|(0|Xk)<(0|_k))break f;if((0|(il=q[Zk+il>>2]))<0|(0|Xk)<=(0|il))break f;if((_k=_k+il|0)>>>31|(0|Xk)<(0|_k))break f}if((0|Vk)==(0|(a=a+1|0)))break}for(a=0;;){if(_k=q[Zk+(a<<2)>>2]<<2,Xk=q[_k+Yk>>2]){if((0|Xk)<0|(0|el)<(0|Xk))break f;if((0|(_k=q[_k+dl>>2]))<0|(0|el)<=(0|_k))break f;if((0|(Xk=Xk+_k|0))<0|(0|el)<(0|Xk))break f}if((0|Vk)==(0|(a=a+1|0)))break}}}}}return L=pl,1}return Y(4,1846,0),L=pl,0}q[_k+52>>2]=Xk,q[_k+48>>2]=5,Y(4,1640,_k+48|0)}else q[_k+32>>2]=Xk,Y(4,1554,_k+32|0);return L=pl,0}(a,vj):(q[20+wj>>2]=1621,q[16+wj>>2]=2284,Y(4,1294,16+wj|0),0):(q[4+wj>>2]=1444,q[wj>>2]=2284,Y(4,1294,wj),0),L=48+wj|0,0|a},j:function(a){q[1805]=a|=0},k:function(a,ej){var fj;return ej|=0,L=fj=L-48|0,a=(a|=0)?(a+63&-64)!=(0|a)?(q[36+fj>>2]=1522,q[32+fj>>2]=2305,Y(4,1294,32+fj|0),0):(ej+63&-64)==(0|ej)&&ej?function(a){var Qk,Tk,Uk,Uh,Kk=0,Lk=0,Mk=0,Nk=0,Ok=0,Pk=0,Rk=0,Sk=0;q[24+(L=Qk=L-32|0)>>2]=0,q[16+Qk>>2]=5,q[20+Qk>>2]=0,Ka(16+(L=Uh=L-272|0)|0,2227,q[12+Uh>>2]=16+Qk|0),function(a){var Hc;q[(L=Hc=L-16|0)>>2]=a,function(a,Il){var Jl;q[12+(L=Jl=L-16|0)>>2]=Il,Ia(a,1432,Il,0,0),L=16+Jl|0}(q[970],Hc),L=16+Hc|0}(16+Uh|0),L=272+Uh|0;a:{if(sa(a))Y(4,1932,0);else{if(!(6<=(Mk=r[a+4|0])>>>0)){if(1!=(0|!r[a+5|0])?(da(a+4|0,1),X(a- -64|0,4,160),na(a,a+704|(o[a+5|0]=0)),ya(a)):na(a,a+704|0),r[7224]||(q[1807]=6,o[7224]=1,q[1808]=7,q[1809]=8,q[1810]=9),Lk=q[a+704>>2],1<=(0|(Mk=q[Lk+16>>2]))){for(Sk=(Nk=q[a+912>>2])+(Mk<<2)|0,Ok=q[a+908>>2];;){Rk=q[a+1204>>2]+(q[Ok>>2]<<2)|0;d:if(!(((Lk=0)|(Kk=(Mk=q[Nk>>2])+-1|0))<1))e:for(;;){for(;;){if(q[(Pk=Rk+(Lk<<2)|0)>>2]<=-1){if(function(a,Vk,ql){var rl=0,sl=0;a:if((0|a)!=(0|Vk)){if(!(a>>>0>>0&&Vk>>>0<(sl=a+ql|0)>>>0))return $(a,Vk,ql);if(rl=3&(a^Vk),a>>>0>>0){if(!rl){if(3&a)for(;;){if(!ql)break a;if(o[0|a]=r[0|Vk],Vk=Vk+1|0,ql=ql+-1|0,!(3&(a=a+1|0)))break}if(!(ql>>>0<=3)){for(rl=ql;q[a>>2]=q[Vk>>2],Vk=Vk+4|0,a=a+4|0,3<(rl=rl+-4|0)>>>0;);ql&=3}}if(ql)for(;o[0|a]=r[0|Vk],a=a+1|0,Vk=Vk+1|0,ql=ql+-1|0;);}else{if(!rl){if(3&sl)for(;;){if(!ql)break a;if(o[0|(rl=(ql=ql+-1|0)+a|0)]=r[Vk+ql|0],!(3&rl))break}if(!(ql>>>0<=3))for(;q[(ql=ql+-4|0)+a>>2]=q[Vk+ql>>2],3>>0;);}if(ql)for(;o[(ql=ql+-1|0)+a|0]=r[Vk+ql|0],ql;);}}}(Pk,Pk+4|0,(-1^Lk)+Mk<<2),(0|Lk)<(0|(Kk=(Mk=Kk)+-1|0)))continue e;break d}if(!((0|(Lk=Lk+1|0))<(0|Kk)))break}break}if(Lk=Nk,0<(0|Mk)&&(Mk=q[Rk+(Kk<<2)>>2]<0?Kk:Mk),q[Lk>>2]=Mk,Ok=Ok+4|0,!((Nk=Nk+4|0)>>>0>>0))break}Lk=q[a+704>>2]}if(1<=q[Lk>>2])for(Kk=0;q[q[a+712>>2]+(Kk<<2)>>2]=q[a+716>>2]+(Kk<<6),Lk=q[a+704>>2],(0|(Kk=Kk+1|0))>2];);if(1<=q[Lk+4>>2])for(Kk=0;q[q[a+744>>2]+(Kk<<2)>>2]=q[a+748>>2]+(Kk<<6),Lk=q[a+704>>2],(0|(Kk=Kk+1|0))>2];);if(1<=q[Lk+16>>2])for(Kk=0;q[(Mk=Kk<<2)+q[a+832>>2]>>2]=q[a+848>>2]+(Kk<<6),q[Mk+q[a+836>>2]>>2]=q[a+1196>>2]+(q[Mk+q[a+896>>2]>>2]<<2),q[Mk+q[a+840>>2]>>2]=q[a+1200>>2]+(q[Mk+q[a+900>>2]>>2]<<1),q[Mk+q[a+844>>2]>>2]=q[a+1204>>2]+(q[Mk+q[a+908>>2]>>2]<<2),Lk=q[a+704>>2],(0|(Kk=Kk+1|0))>2];);if(1<=q[Lk+20>>2])for(Kk=0;q[q[a+916>>2]+(Kk<<2)>>2]=q[a+920>>2]+(Kk<<6),Lk=q[a+704>>2],(0|(Kk=Kk+1|0))>2];);if(1<=q[Lk+80>>2])for(Kk=0;q[q[a+1240>>2]+(Kk<<2)>>2]=q[a+1244>>2]+(Kk<<6),Lk=q[a+704>>2],(0|(Kk=Kk+1|0))>2];);if(1&o[q[a+708>>2]+20|0])break a;if((0|(Nk=q[Lk+16>>2]))<1)break a;for(Kk=q[a+904>>2],Rk=q[a+900>>2],Pk=q[a+1200>>2],Ok=0;;){if(0<(0|(Sk=q[(Mk=Ok<<2)+Kk>>2]+-1|0)))for(Tk=Pk+(q[Mk+Rk>>2]<<1)|0,Lk=0;Uk=s[(Mk=Tk+(Lk<<1)|0)>>1],p[Mk>>1]=s[Mk+4>>1],p[Mk+4>>1]=Uk,(0|(Lk=Lk+3|0))<(0|Sk););if((0|Nk)==(0|(Ok=Ok+1|0)))break}for(Mk=q[a+892>>2],Ok=q[a+896>>2],Rk=q[a+1196>>2],Kk=0;;){if(1<=(0|(Pk=q[(Lk=Kk<<2)+Mk>>2])))for(Pk=(Lk=Rk+(q[Lk+Ok>>2]<<2)|0)+(Pk<<3)|0,Lk=Lk+4|0;u[Lk>>2]=x(1)-u[Lk>>2],(Lk=Lk+8|0)>>>0>>0;);if((0|Nk)==(0|(Kk=Kk+1|0)))break}break a}q[4+Qk>>2]=Mk,q[Qk>>2]=5,Y(4,2023,Qk)}a=0}return L=32+Qk|0,a}(a):(q[20+fj>>2]=1621,q[16+fj>>2]=2305,Y(4,1294,16+fj|0),0):(q[4+fj>>2]=1444,q[fj>>2]=2305,Y(4,1294,fj),0),L=48+fj|0,0|a},l:function(a,ej,fj,gj){var hj;ej|=0,fj|=0,gj|=0,L=hj=L+-64|0,(a|=0)?ej?fj?gj?(a=q[q[a>>2]+708>>2],q[ej>>2]=q[a+12>>2],q[ej+4>>2]=q[a+16>>2],q[fj>>2]=q[a+4>>2],q[fj+4>>2]=q[a+8>>2],q[gj>>2]=q[a>>2]):(q[52+hj>>2]=1995,q[48+hj>>2]=2325,Y(4,1294,48+hj|0)):(q[36+hj>>2]=1903,q[32+hj>>2]=2325,Y(4,1294,32+hj|0)):(q[20+hj>>2]=1819,q[16+hj>>2]=2325,Y(4,1294,16+hj|0)):(q[4+hj>>2]=1740,q[hj>>2]=2325,Y(4,1294,hj)),L=64+hj|0},m:xa,n:wa,o:function(a){var dj;L=dj=L-16|0,(a|=0)?ua(a):(q[4+dj>>2]=1740,q[dj>>2]=2387,Y(4,1294,dj)),L=16+dj|0},p:function(a){var cj;return L=cj=L-16|0,a=(a|=0)?q[a+540>>2]:(q[4+cj>>2]=1740,q[cj>>2]=2402,Y(4,1294,cj),-1),L=16+cj|0,0|a},q:function(a){var bj;return L=bj=L-16|0,a=(a|=0)?q[q[a>>2]+916>>2]:(q[4+bj>>2]=1740,q[bj>>2]=2423,Y(4,1294,bj),0),L=16+bj|0,0|a},r:function(a){var aj;return L=aj=L-16|0,a=(a|=0)?q[a+548>>2]:(q[4+aj>>2]=1740,q[aj>>2]=2442,Y(4,1294,aj),0),L=16+aj|0,0|a},s:function(a){var $i;return L=$i=L-16|0,a=(a|=0)?q[q[a>>2]+928>>2]:(q[4+$i>>2]=1740,q[$i>>2]=2463,Y(4,1294,$i),0),L=16+$i|0,0|a},t:function(a){var _i;return L=_i=L-16|0,a=(a|=0)?q[q[a>>2]+924>>2]:(q[4+_i>>2]=1740,q[_i>>2]=2492,Y(4,1294,_i),0),L=16+_i|0,0|a},u:function(a){var Zi;return L=Zi=L-16|0,a=(a|=0)?q[q[a>>2]+932>>2]:(q[4+Zi>>2]=1740,q[Zi>>2]=2521,Y(4,1294,Zi),0),L=16+Zi|0,0|a},v:function(a){var Yi;return L=Yi=L-16|0,a=(a|=0)?q[a+552>>2]:(q[4+Yi>>2]=1740,q[Yi>>2]=2550,Y(4,1294,Yi),0),L=16+Yi|0,0|a},w:function(a){var Xi;return L=Xi=L-16|0,a=(a|=0)?q[a+4>>2]:(q[4+Xi>>2]=1740,q[Xi>>2]=2572,Y(4,1294,Xi),-1),L=16+Xi|0,0|a},x:function(a){var Wi;return L=Wi=L-16|0,a=(a|=0)?q[q[a>>2]+712>>2]:(q[4+Wi>>2]=1740,q[Wi>>2]=2588,Y(4,1294,Wi),0),L=16+Wi|0,0|a},y:function(a){var Vi;return L=Vi=L-16|0,a=(a|=0)?q[a+52>>2]:(q[4+Vi>>2]=1740,q[Vi>>2]=2602,Y(4,1294,Vi),0),L=16+Vi|0,0|a},z:function(a){var Ui;return L=Ui=L-16|0,a=(a|=0)?q[q[a>>2]+740>>2]:(q[4+Ui>>2]=1740,q[Ui>>2]=2622,Y(4,1294,Ui),0),L=16+Ui|0,0|a},A:function(a){var Ti;return L=Ti=L-16|0,a=(a|=0)?q[a+332>>2]:(q[4+Ti>>2]=1740,q[Ti>>2]=2650,Y(4,1294,Ti),-1),L=16+Ti|0,0|a},B:function(a){var Si;return L=Si=L-16|0,a=(a|=0)?q[q[a>>2]+832>>2]:(q[4+Si>>2]=1740,q[Si>>2]=2670,Y(4,1294,Si),0),L=16+Si|0,0|a},C:function(a){var Ri;return L=Ri=L-16|0,a=(a|=0)?q[q[a>>2]+888>>2]:(q[4+Ri>>2]=1740,q[Ri>>2]=2688,Y(4,1294,Ri),0),L=16+Ri|0,0|a},D:function(a){var Qi;return L=Qi=L-16|0,a=(a|=0)?q[a+432>>2]:(q[4+Qi>>2]=1740,q[Qi>>2]=2716,Y(4,1294,Qi),0),L=16+Qi|0,0|a},E:function(a){var Pi;return L=Pi=L-16|0,a=(a|=0)?q[q[a>>2]+884>>2]:(q[4+Pi>>2]=1740,q[Pi>>2]=2743,Y(4,1294,Pi),0),L=16+Pi|0,0|a},F:function(a){var Oi;return L=Oi=L-16|0,a=(a|=0)?q[a+440>>2]:(q[4+Oi>>2]=1740,q[Oi>>2]=2772,Y(4,1294,Oi),0),L=16+Oi|0,0|a},G:function(a){var Ni;return L=Ni=L-16|0,a=(a|=0)?q[a+436>>2]:(q[4+Ni>>2]=1740,q[Ni>>2]=2797,Y(4,1294,Ni),0),L=16+Ni|0,0|a},H:function(a){var Mi;return L=Mi=L-16|0,a=(a|=0)?q[a+448>>2]:(q[4+Mi>>2]=1740,q[Mi>>2]=2824,Y(4,1294,Mi),0),L=16+Mi|0,0|a},I:function(a){var Li;return L=Li=L-16|0,a=(a|=0)?q[q[a>>2]+912>>2]:(q[4+Li>>2]=1740,q[Li>>2]=2848,Y(4,1294,Li),0),L=16+Li|0,0|a},J:function(a){var Ki;return L=Ki=L-16|0,a=(a|=0)?q[q[a>>2]+844>>2]:(q[4+Ki>>2]=1740,q[Ki>>2]=2873,Y(4,1294,Ki),0),L=16+Ki|0,0|a},K:function(a){var Ji;return L=Ji=L-16|0,a=(a|=0)?q[q[a>>2]+892>>2]:(q[4+Ji>>2]=1740,q[Ji>>2]=2893,Y(4,1294,Ji),0),L=16+Ji|0,0|a},L:function(a){var Ii;return L=Ii=L-16|0,a=(a|=0)?q[a+444>>2]:(q[4+Ii>>2]=1740,q[Ii>>2]=2920,Y(4,1294,Ii),0),L=16+Ii|0,0|a},M:function(a){var si;return L=si=L-16|0,a=(a|=0)?q[q[a>>2]+836>>2]:(q[4+si>>2]=1740,q[si>>2]=2950,Y(4,1294,si),0),L=16+si|0,0|a},N:function(a){var ri;return L=ri=L-16|0,a=(a|=0)?q[q[a>>2]+904>>2]:(q[4+ri>>2]=1740,q[ri>>2]=2974,Y(4,1294,ri),0),L=16+ri|0,0|a},O:function(a){var qi;return L=qi=L-16|0,a=(a|=0)?q[q[a>>2]+840>>2]:(q[4+qi>>2]=1740,q[qi>>2]=3e3,Y(4,1294,qi),0),L=16+qi|0,0|a},P:function(a){var pi;return L=pi=L-16|0,a=(a|=0)?q[a+452>>2]:(q[4+pi>>2]=1740,q[pi>>2]=3022,Y(4,1294,pi),0),L=16+pi|0,0|a},Q:function(a){var oi;return L=oi=L-16|0,a=(a|=0)?q[a+456>>2]:(q[4+oi>>2]=1740,q[oi>>2]=3051,Y(4,1294,oi),0),L=16+oi|0,0|a},R:function(a){var ni;return L=ni=L-16|0,a=(a|=0)?q[q[a>>2]+876>>2]:(q[4+ni>>2]=1740,q[ni>>2]=3078,Y(4,1294,ni),0),L=16+ni|0,0|a},S:function(a){var mi;L=mi=L-16|0,(a|=0)?q[a+428>>2]=1:(q[4+mi>>2]=1740,q[mi>>2]=3110,Y(4,1294,mi)),L=16+mi|0},T:function(a){var li;return L=li=L-16|0,a=(a|=0)?q[a+640>>2]:(q[4+li>>2]=1740,q[li>>2]=3139,Y(4,1294,li),0),L=16+li|0,0|a},U:function(a){var ji;return L=ji=L-16|0,a=(a|=0)?q[a+636>>2]:(q[4+ji>>2]=1740,q[ji>>2]=3164,Y(4,1294,ji),0),L=16+ji|0,0|a},V:function(a){var Fc;return oa(12+(L=Fc=L-16|0)|0,64,a|=0),L=16+Fc|0,q[12+Fc>>2]},W:function(a){var Ec,Cc,Dc=0;return L=Cc=L-16|0,!(a|=0)||oa(12+Cc|0,16,Ec=xa(a))||(Dc=wa(a,q[12+Cc>>2],Ec))||(pa(q[12+Cc>>2]),Dc=0),L=16+Cc|0,0|Dc},X:function(a){return 0|qa(a|=0)},Y:function(a){pa(a|=0)},Z:function(a){var Sm;oa(12+(L=Sm=L-16|0)|0,64,a|=0),pa(q[12+Sm>>2]),L=16+Sm|0},_:function(){return 0|L},$:function(a){return 0|(L=L-(0|a)&-16)},aa:function(a){L=0|a},ba:function(a){return 0|(a=0|(a|=0),(P=0|N())<(a=P+(a|=0)|0)&&a<65536&&(a=new ArrayBuffer(w(a,65536)),(S=new global.Int8Array(a)).set(o),o=S,o=new global.Int8Array(a),p=new global.Int16Array(a),q=new global.Int32Array(a),r=new global.Uint8Array(a),s=new global.Uint16Array(a),t=new global.Uint32Array(a),u=new global.Float32Array(a),v=new global.Float64Array(a),buffer=a,m.buffer=a),P);var S,P},ca:function(a,Vk){n[a|=0](Vk|=0)}};function X(a,b,c){var e,f,d=0;if(c)for(;;){if(c=c+-1|0,a>>>0<(d=(e=a+b|0)-1|0)>>>0)for(;f=r[0|a],o[0|a]=r[0|d],o[0|d]=f,(a=a+1|0)>>>0<(d=d+-1|0)>>>0;);if(a=e,!c)break}}function Y(a,b,c){var g;L=g=L-272|0,t[1804]>a>>>0||(a=q[1805])&&(Ka(16+g|0,b,q[12+g>>2]=c),n[a](16+g|0)),L=272+g|0}function Z(a,b,c){32&r[0|a]||!function(a,Rm,Sm){var Tm=0,Um=0,tn=0;a:{if(!(Tm=q[Sm+16>>2])){if(function(a){var Rm;return Rm=r[a+74|0],o[a+74|0]=Rm+-1|Rm,8&(Rm=q[a>>2])?(q[a>>2]=32|Rm,1):(q[a+4>>2]=0,q[a+8>>2]=0,Rm=q[a+44>>2],q[a+28>>2]=Rm,q[a+20>>2]=Rm,q[a+16>>2]=Rm+q[a+48>>2],0)}(Sm))break a;Tm=q[Sm+16>>2]}if(Tm-(tn=q[Sm+20>>2])>>>0>>0)return n[q[Sm+36>>2]](Sm,a,Rm);b:if(!(o[Sm+75|0]<0)){for(Tm=Rm;;){if(!(Um=Tm))break b;if(10==r[(Tm=Um+-1|0)+a|0])break}if(n[q[Sm+36>>2]](Sm,a,Um)>>>0>>0)break a;Rm=Rm-Um|0,a=a+Um|0,tn=q[Sm+20>>2]}$(tn,a,Rm),q[Sm+20>>2]=q[Sm+20>>2]+Rm}}(b,c,a)}function _(a,b,c,h,i){var k,l,j;if(L=j=L-256|0,!(73728&i|(0|c)<=(0|h))){if(ca(j,b,(k=(i=c-h|0)>>>0<256)?i:256),b=a,l=j,!k){for(c=c-h|0;Z(a,j,256),255<(i=i+-256|0)>>>0;);i=255&c}Z(b,l,i)}L=256+j|0}function $(a,b,c){var h,i=0;if(8192<=c>>>0)I(0|a,0|b,0|c);else{if(h=a+c|0,3&(a^b))if(h>>>0<4)c=a;else if((i=h-4|0)>>>0>>0)c=a;else for(c=a;o[0|c]=r[0|b],o[c+1|0]=r[b+1|0],o[c+2|0]=r[b+2|0],o[c+3|0]=r[b+3|0],b=b+4|0,(c=c+4|0)>>>0<=i>>>0;);else{b:if((0|c)<1)c=a;else if(3&a)for(c=a;;){if(o[0|c]=r[0|b],b=b+1|0,h>>>0<=(c=c+1|0)>>>0)break b;if(!(3&c))break}else c=a;if(!((a=-4&h)>>>0<64||(i=a+-64|0)>>>0>>0))for(;q[c>>2]=q[b>>2],q[c+4>>2]=q[b+4>>2],q[c+8>>2]=q[b+8>>2],q[c+12>>2]=q[b+12>>2],q[c+16>>2]=q[b+16>>2],q[c+20>>2]=q[b+20>>2],q[c+24>>2]=q[b+24>>2],q[c+28>>2]=q[b+28>>2],q[c+32>>2]=q[b+32>>2],q[c+36>>2]=q[b+36>>2],q[c+40>>2]=q[b+40>>2],q[c+44>>2]=q[b+44>>2],q[c+48>>2]=q[b+48>>2],q[c+52>>2]=q[b+52>>2],q[c+56>>2]=q[b+56>>2],q[c+60>>2]=q[b+60>>2],b=b- -64|0,(c=c- -64|0)>>>0<=i>>>0;);if(!(a>>>0<=c>>>0))for(;q[c>>2]=q[b>>2],b=b+4|0,(c=c+4|0)>>>0>>0;);}if(c>>>0>>0)for(;o[0|c]=r[0|b],b=b+1|0,(0|h)!=(0|(c=c+1|0)););}}function aa(a){var b,c;return x((b=a*a)*b*(c=b*a)*(2718311493989822e-21*b-.00019839334836096632)+(c*(.008333329385889463*b-.16666666641626524)+a))}function ba(a){var m;return x(-.499999997251031*(a*=a)+1+.04166662332373906*(m=a*a)+a*m*(2439044879627741e-20*a-.001388676377460993))}function ca(a,n,p){var r,s,t,u;if(p&&(o[(r=a+p|0)-1|0]=n,o[0|a]=n,!(p>>>0<3||(o[r-2|0]=n,o[a+1|0]=n,o[r-3|0]=n,o[a+2|0]=n,p>>>0<7)||(o[r-4|0]=n,o[a+3|0]=n,p>>>0<9)||(s=(r=0-a&3)+a|0,n=w(255&n,16843009),q[s>>2]=n,q[(r=(p=p-r&-4)+s|0)-4>>2]=n,p>>>0<9)||(q[8+s>>2]=n,q[4+s>>2]=n,q[r-8>>2]=n,q[r-12>>2]=n,p>>>0<25)||(q[24+s>>2]=n,q[20+s>>2]=n,q[16+s>>2]=n,q[12+s>>2]=n,q[r-16>>2]=n,q[r-20>>2]=n,q[r-24>>2]=n,q[r-28>>2]=n,(p=p-(u=4&s|24)|0)>>>0<32))))for(t=r=n,n=s+u|0;q[n+24>>2]=t,q[n+28>>2]=r,q[n+16>>2]=t,q[n+20>>2]=r,q[n+8>>2]=t,q[n+12>>2]=r,q[n>>2]=t,q[n+4>>2]=r,n=n+32|0,31<(p=p+-32|0)>>>0;);return a}function da(a,n){var p;if(a>>>0<(n=(a+n|0)-1|0)>>>0)for(;p=r[0|a],o[0|a]=r[0|n],o[0|n]=p,(a=a+1|0)>>>0<(n=n+-1|0)>>>0;);}function ea(a){var n,o=N();return(a=(n=q[2216])+a|0)>>>0<=o<<16>>>0||J(0|a)?(q[2216]=a,n):(q[2086]=48,-1)}function fa(a,v,y,z,B,C,D){var H,I,K,N,Q,R,S,O,P,J,E=0,F=x(0),G=x(0),M=x(0);if(x(0),x(0),x(0),x(0),L=J=L-16|0,1<=(0|a))for(R=w(a,12)+v|0;;){if(1<=(0|(I=q[v+4>>2])))for(S=(a=q[v+8>>2])+w(I,48)|0,I=(H=q[v>>2]<<4)+D|0,K=(8|H)+D|0,H=(4|H)+D|0;(E=q[a+8>>2])&&((O=E+-1|0)>>>0<=1?(P=(q[a+4>>2]<<2)+y|0,E=q[P+(q[a+12>>2]<<2)>>2]<<2,F=u[E+C>>2],Q=u[B+E>>2],G=u[z+E>>2],O-1?(M=G,G=u[a+20>>2],u[I>>2]=u[I>>2]+x(u[a+44>>2]*x(M*G)),u[H>>2]=u[H>>2]+x(x(Q*G)*u[a+44>>2]),u[K>>2]=u[K>>2]+x(x(F*G)*u[a+44>>2])):(E=q[(q[a+16>>2]<<2)+P>>2]<<2,O=u[E+C>>2],P=u[B+E>>2],M=G,G=u[a+20>>2],N=u[a+24>>2],u[I>>2]=u[I>>2]+x(u[a+44>>2]*x(x(M*G)+x(u[z+E>>2]*N))),u[H>>2]=u[H>>2]+x(x(x(Q*G)+x(P*N))*u[a+44>>2]),u[K>>2]=u[K>>2]+x(x(x(F*G)+x(O*N))*u[a+44>>2]))):(q[J>>2]=E,Y(4,1024,J))),(a=a+48|0)>>>0>>0;);if(a=(q[v>>2]<<4)+D|0,F=u[a>>2],u[a>>2]=F>2],u[a+4>>2]=F>2],u[a+8>>2]=F>>0>>0))break}L=16+J|0}function ga(a,q,v){var y,z,x=0;if(1==(0|q)&a>>>0<0|q>>>0<1)x=a;else for(;y=bd(x=cd(a,q,10),z=M,10),o[0|(v=v+-1|0)]=a-y|48,y=9==(0|q)&4294967295>>0|9>>0,a=x,q=z,y;);if(x)for(;o[0|(v=v+-1|0)]=x-w(a=(x>>>0)/10|0,10)|48,q=9>>0,x=a,q;);return v}function ha(a){return a+-48>>>0<10}function ia(a){var q;return(q=La(a,64))?q-a|0:64}function ja(a,v){var w=0;return 1024<=(0|v)?(a*=898846567431158e293,v=(0|(w=v+-1023|0))<1024?w:(a*=898846567431158e293,((0|v)<3069?v:3069)+-2046|0)):-1023<(0|v)||(a*=22250738585072014e-324,v=-1023<(0|(w=v+1022|0))?w:(a*=22250738585072014e-324,(-3066<(0|v)?v:-3066)+2044|0)),f(0,0),f(1,v+1023<<20),a*+g()}function ka(a,v){var A=0,C=a,B=v>>>0<=31?(A=q[a+4>>2],q[a>>2]):(A=q[a>>2],q[a+4>>2]=A,v=v+-32|(q[a>>2]=0),0);q[C>>2]=B<>2]=A<>>32-v}function la(a,v,D,V,W){var X,Y=0,Z=0,_=0;L=X=L-240|0,Y=q[v>>2],q[232+X>>2]=Y,v=q[v+4>>2],q[X>>2]=a,Z=1;a:{b:{c:{if(((q[236+X>>2]=v)||1!=(0|Y))&&(Y=a-q[(D<<2)+W>>2]|0,!((0|n[5](Y,a))<1))){for(_=!V;;){e:{if(v=Y,!(!_|(0|D)<2)){if(V=q[((D<<2)+W|0)-8>>2],-1<(0|n[5](Y=a+-4|0,v)))break e;if(-1<(0|n[5](Y-V|0,v)))break e}if(q[(Z<<2)+X>>2]=v,Z=Z+1|0,ma(232+X|0,a=Oa(232+X|0)),D=a+D|0,!q[236+X>>2]&&1==q[232+X>>2])break b;if(_=1,Y=(a=v)-q[(D<<2)+W>>2]|(V=0),0<(0|n[5](Y,q[X>>2])))continue;break c}break}v=a;break b}v=a}if(V)break a}Na(X,Z),ta(v,D,W)}L=240+X|0}function ma(a,v){var D=0,V=a,L=v>>>0<=31?(D=q[a>>2],q[a+4>>2]):(D=q[a+4>>2],q[a+4>>2]=0,q[a>>2]=D,v=v+-32|0,0);q[V+4>>2]=L>>>v,q[a>>2]=L<<32-v|D>>>v}function na(a,v){var W=r[a+4|0];q[v>>2]=q[a+64>>2]+a,q[v+4>>2]=q[a+68>>2]+a,q[v+8>>2]=q[a+72>>2]+a,q[v+12>>2]=q[a+76>>2]+a,q[v+16>>2]=q[a+80>>2]+a,q[v+20>>2]=q[a+84>>2]+a,q[v+24>>2]=q[a+88>>2]+a,q[v+28>>2]=q[a+92>>2]+a,q[v+32>>2]=q[a+96>>2]+a,q[v+36>>2]=q[a+100>>2]+a,q[v+40>>2]=q[a+104>>2]+a,q[v+44>>2]=q[a+108>>2]+a,q[v+48>>2]=q[a+112>>2]+a,q[v+52>>2]=q[a+116>>2]+a,q[v+56>>2]=q[a+120>>2]+a,q[v+60>>2]=q[a+124>>2]+a,q[v- -64>>2]=q[a+128>>2]+a,q[v+68>>2]=q[a+132>>2]+a,q[v+72>>2]=q[a+136>>2]+a,q[v+76>>2]=q[a+140>>2]+a,q[v+80>>2]=q[a+144>>2]+a,q[v+84>>2]=q[a+148>>2]+a,q[v+92>>2]=q[a+152>>2]+a,q[v+96>>2]=q[a+156>>2]+a,q[v+100>>2]=q[a+160>>2]+a,q[v+108>>2]=q[a+164>>2]+a,q[v+112>>2]=q[a+168>>2]+a,q[v+116>>2]=q[a+172>>2]+a,q[v+124>>2]=q[a+176>>2]+a,q[v+128>>2]=q[a+180>>2]+a,q[v+132>>2]=q[a+184>>2]+a,q[v+136>>2]=q[a+188>>2]+a,q[v+140>>2]=q[a+192>>2]+a,q[v+144>>2]=q[a+196>>2]+a,q[v+148>>2]=q[a+200>>2]+a,q[v+152>>2]=q[a+204>>2]+a,q[v+156>>2]=q[a+208>>2]+a,q[v+164>>2]=q[a+212>>2]+a,q[v+168>>2]=q[a+216>>2]+a,q[v+172>>2]=q[a+220>>2]+a,q[v+176>>2]=q[a+224>>2]+a,q[v+180>>2]=q[a+228>>2]+a,q[v+184>>2]=q[a+232>>2]+a,q[v+188>>2]=q[a+236>>2]+a,q[v+192>>2]=q[a+240>>2]+a,q[v+196>>2]=q[a+244>>2]+a,q[v+200>>2]=q[a+248>>2]+a,q[v+204>>2]=q[a+252>>2]+a,q[v+208>>2]=q[a+256>>2]+a,q[v+212>>2]=q[a+260>>2]+a,q[v+216>>2]=q[a+264>>2]+a,q[v+220>>2]=q[a+268>>2]+a,q[v+224>>2]=q[a+272>>2]+a,q[v+228>>2]=q[a+276>>2]+a,q[v+232>>2]=q[a+280>>2]+a,q[v+236>>2]=q[a+284>>2]+a,q[v+244>>2]=q[a+288>>2]+a,q[v+248>>2]=q[a+292>>2]+a,q[v+272>>2]=q[a+296>>2]+a,q[v+276>>2]=q[a+300>>2]+a,q[v+280>>2]=q[a+304>>2]+a,q[v+292>>2]=q[a+308>>2]+a,q[v+296>>2]=q[a+312>>2]+a,q[v+300>>2]=q[a+316>>2]+a,q[v+304>>2]=q[a+320>>2]+a,q[v+308>>2]=q[a+324>>2]+a,q[v+312>>2]=q[a+328>>2]+a,q[v+316>>2]=q[a+332>>2]+a,q[v+328>>2]=q[a+336>>2]+a,q[v+332>>2]=q[a+340>>2]+a,q[v+336>>2]=q[a+344>>2]+a,q[v+348>>2]=q[a+348>>2]+a,q[v+360>>2]=q[a+352>>2]+a,q[v+364>>2]=q[a+356>>2]+a,q[v+368>>2]=q[a+360>>2]+a,q[v+352>>2]=q[a+364>>2]+a,q[v+356>>2]=q[a+368>>2]+a,q[v+488>>2]=q[a+372>>2]+a,q[v+492>>2]=q[a+376>>2]+a,q[v+496>>2]=q[a+380>>2]+a,q[v+500>>2]=q[a+384>>2]+a,q[v+504>>2]=q[a+388>>2]+a,q[v+508>>2]=q[a+392>>2]+a,q[v+512>>2]=q[a+396>>2]+a,q[v+516>>2]=q[a+400>>2]+a,q[v+520>>2]=q[a+404>>2]+a,q[v+524>>2]=q[a+408>>2]+a,q[v+528>>2]=q[a+412>>2]+a,q[v+532>>2]=q[a+416>>2]+a,q[v+536>>2]=q[a+420>>2]+a,q[v+540>>2]=q[a+424>>2]+a,q[v+544>>2]=q[a+428>>2]+a,q[v+548>>2]=q[a+432>>2]+a,q[v+552>>2]=q[a+436>>2]+a,q[v+556>>2]=q[a+440>>2]+a,q[v+560>>2]=q[a+444>>2]+a,q[v+564>>2]=q[a+448>>2]+a,q[v+568>>2]=q[a+452>>2]+a,q[v+572>>2]=q[a+456>>2]+a,q[v+576>>2]=q[a+460>>2]+a,q[v+580>>2]=q[a+464>>2]+a,W>>>0<2||(q[v+104>>2]=q[a+468>>2]+a,W>>>0<4)||(q[v+260>>2]=q[a+472>>2]+a,q[v+264>>2]=q[a+476>>2]+a,q[v+268>>2]=q[a+480>>2]+a,q[v+88>>2]=q[a+484>>2]+a,q[v+120>>2]=q[a+488>>2]+a,q[v+160>>2]=q[a+492>>2]+a,q[v+584>>2]=q[a+496>>2]+a,q[v+588>>2]=q[a+500>>2]+a,q[v+592>>2]=q[a+504>>2]+a,q[v+596>>2]=q[a+508>>2]+a,q[v+600>>2]=q[a+512>>2]+a,q[v+604>>2]=q[a+516>>2]+a,q[v+240>>2]=q[a+520>>2]+a,q[v+252>>2]=q[a+524>>2]+a,q[v+256>>2]=q[a+528>>2]+a,q[v+372>>2]=q[a+532>>2]+a,q[v+376>>2]=q[a+536>>2]+a,q[v+380>>2]=q[a+540>>2]+a,q[v+384>>2]=q[a+544>>2]+a,q[v+388>>2]=q[a+548>>2]+a,q[v+392>>2]=q[a+552>>2]+a,q[v+396>>2]=q[a+556>>2]+a,q[v+400>>2]=q[a+560>>2]+a,q[v+416>>2]=q[a+564>>2]+a,q[v+420>>2]=q[a+568>>2]+a,q[v+424>>2]=q[a+572>>2]+a,q[v+440>>2]=q[a+576>>2]+a,q[v+444>>2]=q[a+580>>2]+a,q[v+448>>2]=q[a+584>>2]+a,q[v+464>>2]=q[a+588>>2]+a,q[v+468>>2]=q[a+592>>2]+a,q[v+472>>2]=q[a+596>>2]+a,q[v+476>>2]=q[a+600>>2]+a,q[v+480>>2]=q[a+604>>2]+a,q[v+484>>2]=q[a+608>>2]+a,4!=(0|W)&&(q[v+284>>2]=q[a+612>>2]+a,q[v+288>>2]=q[a+616>>2]+a,q[v+320>>2]=q[a+620>>2]+a,q[v+324>>2]=q[a+624>>2]+a,q[v+340>>2]=q[a+628>>2]+a,q[v+344>>2]=q[a+632>>2]+a,q[v+404>>2]=q[a+636>>2]+a,q[v+408>>2]=q[a+640>>2]+a,q[v+412>>2]=q[a+644>>2]+a,q[v+428>>2]=q[a+648>>2]+a,q[v+432>>2]=q[a+652>>2]+a,q[v+436>>2]=q[a+656>>2]+a,q[v+452>>2]=q[a+660>>2]+a,q[v+456>>2]=q[a+664>>2]+a,q[v+460>>2]=q[a+668>>2]+a))}function oa(a,v,$){var aa=0;a:{if(8==(0|v))v=qa($);else{if(aa=28,3&v|1!=(0|function(a){for(var $o=0,ap=0;ap=$o,a;)a&=a-1,$o=$o+1|0;return ap}(v>>>2)))break a;if(aa=48,-64-v>>>0<$>>>0)break a;v=function(a,Vk){var vl,wl,ql=0,tl=0,ul=0;if((tl=a>>>0>(ql=16)?a:16)+-1&tl)for(;ql=(a=ql)<<1,a>>>0>>0;);else a=tl;return-64-a>>>0<=Vk>>>0?(q[2086]=48,0):(ql=qa(12+((tl=Vk>>>0<11?16:Vk+11&-8)+a|0)|0))?(Vk=ql+-8|0,ql&a+-1?(ul=(-8&(wl=q[(vl=ql+-4|0)>>2]))-(ql=(a=15<(ql=((a+ql|0)-1&0-a)-8|0)-Vk>>>0?ql:a+ql|0)-Vk|0)|0,3&wl?(q[a+4>>2]=ul|1&q[a+4>>2]|2,q[4+(ul=a+ul|0)>>2]=1|q[4+ul>>2],q[vl>>2]=ql|1&q[vl>>2]|2,q[a+4>>2]=1|q[a+4>>2],za(Vk,ql)):(Vk=q[Vk>>2],q[a+4>>2]=ul,q[a>>2]=Vk+ql)):a=Vk,3&(Vk=q[a+4>>2])&&((ql=-8&Vk)>>>0<=tl+16>>>0||(q[a+4>>2]=tl|1&Vk|2,q[(Vk=a+tl|0)+4>>2]=3|(tl=ql-tl|0),q[4+(ql=a+ql|0)>>2]=1|q[ql+4>>2],za(Vk,tl))),a+8|0):0}(16>>0?v:16,$)}if(!v)return 1;q[a>>2]=v,aa=0}return aa}function pa(a){var da,v=0,$=0,ba=0,ca=0,ea=0,fa=0,ha=0;a:if(a){da=(ba=a+-8|0)+(a=-8&($=q[a+-4>>2]))|0;b:if(!(1&$)){if(!(3&$))break a;if((ba=ba-($=q[ba>>2])|0)>>>0>>0<=255)ca=q[ba+8>>2],$>>>=3,(0|(v=q[ba+12>>2]))==(0|ca)?(ha=q[2087]&ed($),q[2087]=ha):(q[ca+12>>2]=v,q[v+8>>2]=ca);else{if(fa=q[ba+24>>2],(0|ba)!=(0|($=q[ba+12>>2])))v=q[ba+8>>2],q[v+12>>2]=$,q[$+8>>2]=v;else if(v=(v=q[(ca=ba+20|0)>>2])||q[(ca=ba+16|0)>>2]){for(;ea=ca,(v=q[(ca=($=v)+20|0)>>2])||(ca=$+16|0,v=q[$+16>>2]););q[ea>>2]=0}else $=0;if(fa){ca=q[ba+28>>2];e:{if(q[(v=8652+(ca<<2)|0)>>2]==(0|ba)){if(q[v>>2]=$)break e;ha=q[2088]&ed(ca),q[2088]=ha;break b}if(!(q[fa+(q[fa+16>>2]==(0|ba)?16:20)>>2]=$))break b}q[$+24>>2]=fa,(v=q[ba+16>>2])&&(q[$+16>>2]=v,q[v+24>>2]=$),(v=q[ba+20>>2])&&(q[$+20>>2]=v,q[v+24>>2]=$)}}else if(3==(3&($=q[4+da>>2])))return q[2089]=a,q[4+da>>2]=-2&$,q[ba+4>>2]=1|a,q[a+ba>>2]=a}if(!(da>>>0<=ba>>>0)&&1&($=q[4+da>>2])){f:{if(!(2&$)){if(q[2093]==(0|da)){if(q[2093]=ba,a=q[2090]+a|0,q[2090]=a,q[ba+4>>2]=1|a,q[2092]!=(0|ba))break a;return q[2089]=0,q[2092]=0}if(q[2092]==(0|da))return q[2092]=ba,a=q[2089]+a|0,q[2089]=a,q[ba+4>>2]=1|a,q[a+ba>>2]=a;a=(-8&$)+a|0;g:if($>>>0<=255)$>>>=3,(0|(v=q[8+da>>2]))==(0|(ca=q[12+da>>2]))?(ha=q[2087]&ed($),q[2087]=ha):(q[v+12>>2]=ca,q[ca+8>>2]=v);else{if(fa=q[24+da>>2],(0|da)!=(0|($=q[12+da>>2])))v=q[8+da>>2],q[v+12>>2]=$,q[$+8>>2]=v;else if(v=(v=q[(ca=20+da|0)>>2])||q[(ca=16+da|0)>>2]){for(;ea=ca,(v=q[(ca=($=v)+20|0)>>2])||(ca=$+16|0,v=q[$+16>>2]););q[ea>>2]=0}else $=0;if(fa){ca=q[28+da>>2];j:{if(q[(v=8652+(ca<<2)|0)>>2]==(0|da)){if(q[v>>2]=$)break j;ha=q[2088]&ed(ca),q[2088]=ha;break g}if(!(q[fa+(q[fa+16>>2]==(0|da)?16:20)>>2]=$))break g}q[$+24>>2]=fa,(v=q[16+da>>2])&&(q[$+16>>2]=v,q[v+24>>2]=$),(v=q[20+da>>2])&&(q[$+20>>2]=v,q[v+24>>2]=$)}}if(q[ba+4>>2]=1|a,q[a+ba>>2]=a,q[2092]!=(0|ba))break f;return q[2089]=a}q[4+da>>2]=-2&$,q[ba+4>>2]=1|a,q[a+ba>>2]=a}if(a>>>0<=255)return $=8388+((a>>>=3)<<3)|0,a=(v=q[2087])&(a=1<>2]:(q[2087]=a|v,$),q[$+8>>2]=ba,q[a+12>>2]=ba,q[ba+12>>2]=$,q[ba+8>>2]=a;q[ba+16>>2]=0,v=q[ba+20>>2]=0,(ca=a>>>8)&&(v=31,16777215>>0||(v=ca,v=28+((v=((v=(v<<=ca=ca+1048320>>>16&8)<<(fa=v+520192>>>16&4))<<(ea=v+245760>>>16&2)>>>15)-(ea|ca|fa)|0)<<1|a>>>v+21&1)|0)),ea=8652+((q[($=ba)+28>>2]=v)<<2)|0;m:if((ca=q[2088])&($=1<>>1)|0),$=q[ea>>2];n:{for(;;){if((-8&q[(v=$)+4>>2])==(0|a))break n;if($=ca>>>29,ca<<=1,!($=q[16+(ea=v+(4&$)|0)>>2]))break}q[ea+16>>2]=ba,q[ba+12>>2]=ba,q[ba+24>>2]=v,q[ba+8>>2]=ba;break m}a=q[v+8>>2],q[a+12>>2]=ba,q[v+8>>2]=ba,q[ba+24>>2]=0,q[ba+12>>2]=v,q[ba+8>>2]=a}else q[2088]=$|ca,q[ea>>2]=ba,q[ba+12>>2]=ba,q[ba+24>>2]=ea,q[ba+8>>2]=ba;if(a=q[2095]+-1|0,!(q[2095]=a)){for(ba=8804;ba=(a=q[ba>>2])+8|0,a;);q[2095]=-1}}}}function qa(a){var sa,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,ua=0;L=sa=L-16|0;a:{b:{c:{d:{e:{f:{g:{h:{i:{j:{k:{if(a>>>0<=244){if(3&(ia=(ma=q[2087])>>>(a=(na=a>>>0<11?16:a+11&-8)>>>3))){a=(ia=q[8396+(la=(ja=a+(1&(-1^ia))|0)<<3)>>2])+8|0,(0|(ka=q[ia+8>>2]))==(0|(la=la+8388|0))?(ua=ed(ja)&ma,q[2087]=ua):(q[ka+12>>2]=la,q[la+8>>2]=ka),q[ia+4>>2]=3|(ja<<=3),q[4+(ia=ia+ja|0)>>2]=1|q[ia+4>>2];break a}if(na>>>0<=(pa=q[2089])>>>0)break k;if(ia){ja=ia=(a=(0-(a=(0-(ja=2<>>12&16,ia=q[8396+(ka=(ja=((ja=(ja|=ia=(a>>>=ia)>>>5&8)|(ia=(a>>>=ia)>>>2&4)|(ia=(a>>>=ia)>>>1&2))|(ia=(a>>>=ia)>>>1&1))+(a>>>ia)|0)<<3)>>2],(0|(a=q[ia+8>>2]))==(0|(ka=ka+8388|0))?(ma=ed(ja)&ma,q[2087]=ma):(q[a+12>>2]=ka,q[ka+8>>2]=a),a=ia+8|0,q[ia+4>>2]=3|na,q[4+(oa=ia+na|0)>>2]=1|(la=(ja<<=3)-na|0),q[ia+ja>>2]=la,pa&&(ia=8388+((ja=pa>>>3)<<3)|0,ka=q[2092],ja=(ja=1<>2]:(q[2087]=ja|ma,ia),q[ia+8>>2]=ka,q[ja+12>>2]=ka,q[ka+12>>2]=ia,q[ka+8>>2]=ja),q[2092]=oa,q[2089]=la;break a}if(!(ra=q[2088]))break k;for(ja=ia=(a=(ra&0-ra)-1|0)>>>12&16,ia=q[8652+(((ja=(ja|=ia=(a>>>=ia)>>>5&8)|(ia=(a>>>=ia)>>>2&4)|(ia=(a>>>=ia)>>>1&2))|(ia=(a>>>=ia)>>>1&1))+(a>>>ia)<<2)>>2],ka=(-8&q[ia+4>>2])-na|0,ja=ia;a=(a=q[ja+16>>2])||q[ja+20>>2];)ka=(ja=(la=(-8&q[a+4>>2])-na|0)>>>0>>0)?la:ka,ia=ja?a:ia,ja=a;if(qa=q[ia+24>>2],(0|(la=q[ia+12>>2]))!=(0|ia)){a=q[ia+8>>2],q[a+12>>2]=la,q[la+8>>2]=a;break b}if(!(a=q[(ja=ia+20|0)>>2])){if(!(a=q[ia+16>>2]))break j;ja=ia+16|0}for(;oa=ja,(a=q[(ja=(la=a)+20|0)>>2])||(ja=la+16|0,a=q[la+16>>2]););q[oa>>2]=0;break b}if(na=-1,!(4294967231>>0)&&(na=-8&(ia=a+11|0),pa=q[2088])){ja=0-na|0,ma=0,(ia>>>=8)&&(ma=31,16777215>>0||(ma=28+((a=((ma=(ia<<=ka=ia+1048320>>>16&8)<<(a=ia+520192>>>16&4))<<(ia=ma+245760>>>16&2)>>>15)-(ia|a|ka)|0)<<1|na>>>a+21&1)|0));q:{r:{if(ka=q[8652+(ma<<2)>>2])for(ia=na<<(31==(0|ma)?0:25-(ma>>>1)|0),a=0;;){if(!(ja>>>0<=(oa=(-8&q[ka+4>>2])-na|0)>>>0||(la=ka,ja=oa))){ja=0,a=ka;break r}if(oa=q[ka+20>>2],ka=q[16+((ia>>>29&4)+ka|0)>>2],a=oa&&(0|oa)!=(0|ka)?oa:a,ia<<=0!=(0|ka),!ka)break}else a=0;if(!(a|la)){if(!(a=(0-(a=2<>>12&16,a=q[8652+(((ka=(ka|=ia=(a>>>=ia)>>>5&8)|(ia=(a>>>=ia)>>>2&4)|(ia=(a>>>=ia)>>>1&2))|(ia=(a>>>=ia)>>>1&1))+(a>>>ia)<<2)>>2]}if(!a)break q}for(;ja=(ia=(ka=(-8&q[a+4>>2])-na|0)>>>0>>0)?ka:ja,la=ia?a:la,a=(ia=q[a+16>>2])||q[a+20>>2];);}if(!(!la|ja>>>0>=q[2089]-na>>>0)){if(oa=q[la+24>>2],(0|la)!=(0|(ia=q[la+12>>2]))){a=q[la+8>>2],q[a+12>>2]=ia,q[ia+8>>2]=a;break c}if(!(a=q[(ka=la+20|0)>>2])){if(!(a=q[la+16>>2]))break i;ka=la+16|0}for(;ma=ka,(a=q[(ka=(ia=a)+20|0)>>2])||(ka=ia+16|0,a=q[ia+16>>2]););q[ma>>2]=0;break c}}}if(na>>>0<=(ia=q[2089])>>>0){a=q[2092],16<=(ja=ia-na|0)>>>0?(q[2089]=ja,q[2092]=ka=a+na|0,q[ka+4>>2]=1|ja,q[a+ia>>2]=ja,q[a+4>>2]=3|na):(q[2092]=0,q[2089]=0,q[a+4>>2]=3|ia,q[4+(ia=a+ia|0)>>2]=1|q[ia+4>>2]),a=a+8|0;break a}if(na>>>0<(ka=q[2090])>>>0){q[2090]=ia=ka-na|0,a=q[2093],q[2093]=ja=a+na|0,q[ja+4>>2]=1|ia,q[a+4>>2]=3|na,a=a+8|0;break a}if((ja=(ma=(ja=la=na+47|(a=0))+(ia=q[2205]?q[2207]:(q[2208]=-1,q[2209]=-1,q[2206]=4096,q[2207]=4096,q[2205]=12+sa&-16^1431655768,q[2210]=0,q[2198]=0,4096))|0)&(oa=0-ia|0))>>>0<=na>>>0)break a;if((ia=q[2197])&&(qa=(pa=q[2195])+ja|0)>>>0<=pa>>>0|ia>>>0>>0)break a;if(4&r[8792])break f;v:{w:{if(ia=q[2093])for(a=8796;;){if((pa=q[a>>2])+q[a+4>>2]>>>0>ia>>>0&&pa>>>0<=ia>>>0)break w;if(!(a=q[a+8>>2]))break}if(-1==(0|(ia=ea(0))))break g;if(ma=ja,(ma=(ka=(a=q[2206])+-1|0)&ia?(ja-ia|0)+(ia+ka&0-a)|0:ma)>>>0<=na>>>0|2147483646>>0)break g;if((a=q[2197])&&(oa=(ka=q[2195])+ma|0)>>>0<=ka>>>0|a>>>0>>0)break g;if((0|ia)!=(0|(a=ea(ma))))break v;break e}if(2147483646<(ma=oa&ma-ka)>>>0)break g;if((0|(ia=ea(ma)))==(q[a>>2]+q[a+4>>2]|0))break h;a=ia}if(!(na+48>>>0<=ma>>>0|2147483646>>0|-1==(0|(ia=a)))){if(2147483646<(a=(a=q[2207])+(la-ma|0)&0-a)>>>0)break e;if(-1!=(0|ea(a))){ma=a+ma|0;break e}ea(0-ma|0);break g}if(-1!=(0|ia))break e;break g}la=0;break b}ia=0;break c}if(-1!=(0|ia))break e}q[2198]=4|q[2198]}if(2147483646>>0)break d;if(ia=ea(ja),(a=ea(0))>>>0<=ia>>>0|-1==(0|ia)|-1==(0|a))break d;if((ma=a-ia|0)>>>0<=na+40>>>0)break d}a=q[2195]+ma|0,(q[2195]=a)>>>0>t[2196]&&(q[2196]=a);x:{y:{z:{if(ja=q[2093]){for(a=8796;;){if(((ka=q[a>>2])+(la=q[a+4>>2])|0)==(0|ia))break z;if(!(a=q[a+8>>2]))break}break y}for((a=q[2091])>>>0<=ia>>>0&&a||(q[2091]=ia),a=0,q[2200]=ma,q[2199]=ia,q[2095]=-1,q[2096]=q[2205],q[2202]=0;q[8396+(ja=a<<3)>>2]=ka=ja+8388|0,q[ja+8400>>2]=ka,32!=(0|(a=a+1|0)););q[2090]=ka=(a=ma+-40|0)-(ja=ia+8&7?-8-ia&7:0)|0,q[2093]=ja=ia+ja|0,q[ja+4>>2]=1|ka,q[4+(a+ia|0)>>2]=40,q[2094]=q[2209];break x}if(!(8&r[a+12|0]|ia>>>0<=ja>>>0|ja>>>0>>0)){q[a+4>>2]=la+ma,q[2093]=ia=(a=ja+8&7?-8-ja&7:0)+ja|0,ka=q[2090]+ma|0,q[2090]=a=ka-a|0,q[ia+4>>2]=1|a,q[4+(ja+ka|0)>>2]=40,q[2094]=q[2209];break x}}ia>>>0<(la=q[2091])>>>0&&(q[2091]=ia,la=0),ka=ia+ma|0,a=8796;A:{B:{C:{D:{E:{F:{for(;(0|ka)!=q[a>>2];)if(!(a=q[a+8>>2]))break F;if(!(8&r[a+12|0]))break E}for(a=8796;;){if((ka=q[a>>2])>>>0<=ja>>>0&&ja>>>0<(la=ka+q[a+4>>2]|0)>>>0)break D;a=q[a+8>>2]}}if(q[a>>2]=ia,q[a+4>>2]=q[a+4>>2]+ma,q[4+(qa=(ia+8&7?-8-ia&7:0)+ia|0)>>2]=3|na,a=((ia=ka+(ka+8&7?-8-ka&7:0)|0)-qa|0)-na|0,oa=na+qa|0,(0|ia)==(0|ja)){q[2093]=oa,a=q[2090]+a|0,q[2090]=a,q[oa+4>>2]=1|a;break B}if(q[2092]==(0|ia)){q[2092]=oa,a=q[2089]+a|0,q[2089]=a,q[oa+4>>2]=1|a,q[a+oa>>2]=a;break B}if(1==(3&(ja=q[ia+4>>2]))){ra=-8&ja;G:if(ja>>>0<=255)la=ja>>>3,ja=q[ia+8>>2],(0|(ka=q[ia+12>>2]))==(0|ja)?(ua=q[2087]&ed(la),q[2087]=ua):(q[ja+12>>2]=ka,q[ka+8>>2]=ja);else{if(pa=q[ia+24>>2],(0|(ma=q[ia+12>>2]))!=(0|ia))ja=q[ia+8>>2],q[ja+12>>2]=ma,q[ma+8>>2]=ja;else if(na=(na=q[(ka=ia+20|0)>>2])||q[(ka=ia+16|0)>>2]){for(;ja=ka,(na=q[(ka=(ma=na)+20|0)>>2])||(ka=ma+16|0,na=q[ma+16>>2]););q[ja>>2]=0}else ma=0;if(pa){ja=q[ia+28>>2];J:{if(q[(ka=8652+(ja<<2)|0)>>2]==(0|ia)){if(q[ka>>2]=ma)break J;ua=q[2088]&ed(ja),q[2088]=ua;break G}if(!(q[pa+(q[pa+16>>2]==(0|ia)?16:20)>>2]=ma))break G}q[ma+24>>2]=pa,(ja=q[ia+16>>2])&&(q[ma+16>>2]=ja,q[ja+24>>2]=ma),(ja=q[ia+20>>2])&&(q[ma+20>>2]=ja,q[ja+24>>2]=ma)}}ia=ia+ra|0,a=a+ra|0}if(q[ia+4>>2]=-2&q[ia+4>>2],q[oa+4>>2]=1|a,(q[a+oa>>2]=a)>>>0<=255){a=8388+((ia=a>>>3)<<3)|0,ia=(ja=q[2087])&(ia=1<>2]:(q[2087]=ia|ja,a),q[a+8>>2]=oa,q[ia+12>>2]=oa,q[oa+12>>2]=a,q[oa+8>>2]=ia;break B}if(ia=0,(ka=a>>>8)&&(ia=31,16777215>>0||(ia=28+((ia=((na=(ka<<=la=ka+1048320>>>16&8)<<(ia=ka+520192>>>16&4))<<(ka=na+245760>>>16&2)>>>15)-(ka|ia|la)|0)<<1|a>>>ia+21&1)|0)),q[(ja=oa)+28>>2]=ia,q[oa+16>>2]=0,ja=8652+(ia<<2)|(q[oa+20>>2]=0),(ka=q[2088])&(la=1<>>1)|0),ia=q[ja>>2];;){if((-8&q[(ja=ia)+4>>2])==(0|a))break C;if(ia=ka>>>29,ka<<=1,!(ia=q[16+(la=(4&ia)+ja|0)>>2]))break}q[la+16>>2]=oa}else q[2088]=ka|la,q[ja>>2]=oa;q[oa+24>>2]=ja,q[oa+12>>2]=oa,q[oa+8>>2]=oa;break B}for(q[2090]=oa=(a=ma+-40|0)-(ka=ia+8&7?-8-ia&7:0)|0,q[2093]=ka=ia+ka|0,q[ka+4>>2]=1|oa,q[4+(a+ia|0)>>2]=40,q[2094]=q[2209],q[(ka=(a=(la+(la+-39&7?39-la&7:0)|0)-47|0)>>>0>>0?ja:a)+4>>2]=27,a=q[2202],q[ka+16>>2]=q[2201],q[ka+20>>2]=a,a=q[2200],q[ka+8>>2]=q[2199],q[ka+12>>2]=a,q[2201]=ka+8,q[2200]=ma,q[2199]=ia,a=ka+24|(q[2202]=0);q[a+4>>2]=7,ia=a+8|0,a=a+4|0,ia>>>0>>0;);if((0|ja)==(0|ka))break x;if(q[ka+4>>2]=-2&q[ka+4>>2],q[ja+4>>2]=1|(la=ka-ja|0),(q[ka>>2]=la)>>>0<=255){a=8388+((ia=la>>>3)<<3)|0,ia=(ka=q[2087])&(ia=1<>2]:(q[2087]=ia|ka,a),q[a+8>>2]=ja,q[ia+12>>2]=ja,q[ja+12>>2]=a,q[ja+8>>2]=ia;break x}if(q[ja+16>>2]=0,a=q[ja+20>>2]=0,(ka=la>>>8)&&(a=31,16777215>>0||(a=28+((a=((oa=(ka<<=ma=ka+1048320>>>16&8)<<(a=ka+520192>>>16&4))<<(ka=oa+245760>>>16&2)>>>15)-(ka|a|ma)|0)<<1|la>>>a+21&1)|0)),ia=8652+((q[(ia=ja)+28>>2]=a)<<2)|0,(ka=q[2088])&(ma=1<>>1)|0),ia=q[ia>>2];;){if((0|la)==(-8&q[(ka=ia)+4>>2]))break A;if(ia=a>>>29,a<<=1,!(ia=q[16+(ma=ka+(4&ia)|0)>>2]))break}q[ma+16>>2]=ja,q[ja+24>>2]=ka}else q[2088]=ka|ma,q[ia>>2]=ja,q[ja+24>>2]=ia;q[ja+12>>2]=ja,q[ja+8>>2]=ja;break x}a=q[ja+8>>2],q[a+12>>2]=oa,q[ja+8>>2]=oa,q[oa+24>>2]=0,q[oa+12>>2]=ja,q[oa+8>>2]=a}a=qa+8|0;break a}a=q[ka+8>>2],q[a+12>>2]=ja,q[ka+8>>2]=ja,q[ja+24>>2]=0,q[ja+12>>2]=ka,q[ja+8>>2]=a}if(!((a=q[2090])>>>0<=na>>>0)){q[2090]=ia=a-na|0,a=q[2093],q[2093]=ja=a+na|0,q[ja+4>>2]=1|ia,q[a+4>>2]=3|na,a=a+8|0;break a}}q[2086]=48,a=0;break a}Q:if(oa){a=q[la+28>>2];R:{if(q[(ka=8652+(a<<2)|0)>>2]==(0|la)){if(q[ka>>2]=ia)break R;pa=ed(a)&pa,q[2088]=pa;break Q}if(!(q[oa+(q[oa+16>>2]==(0|la)?16:20)>>2]=ia))break Q}q[ia+24>>2]=oa,(a=q[la+16>>2])&&(q[ia+16>>2]=a,q[a+24>>2]=ia),(a=q[la+20>>2])&&(q[ia+20>>2]=a,q[a+24>>2]=ia)}S:if(ja>>>0<=15)q[la+4>>2]=3|(a=ja+na|0),q[4+(a=a+la|0)>>2]=1|q[a+4>>2];else if(q[la+4>>2]=3|na,q[4+(ka=la+na|0)>>2]=1|ja,(q[ja+ka>>2]=ja)>>>0<=255)a=8388+((ia=ja>>>3)<<3)|0,ia=(ja=q[2087])&(ia=1<>2]:(q[2087]=ia|ja,a),q[a+8>>2]=ka,q[ia+12>>2]=ka,q[ka+12>>2]=a,q[ka+8>>2]=ia;else{a=0,(na=ja>>>8)&&(a=31,16777215>>0||(a=28+((a=((oa=(na<<=ma=na+1048320>>>16&8)<<(a=na+520192>>>16&4))<<(na=oa+245760>>>16&2)>>>15)-(na|a|ma)|0)<<1|ja>>>a+21&1)|0)),q[(ia=ka)+28>>2]=a,q[ka+16>>2]=0,ia=8652+(a<<2)|(q[ka+20>>2]=0);V:{if((na=1<>>1)|0),na=q[ia>>2];;){if((-8&q[(ia=na)+4>>2])==(0|ja))break V;if(na=a>>>29,a<<=1,!(na=q[16+(ma=(4&na)+ia|0)>>2]))break}q[ma+16>>2]=ka}else q[2088]=na|pa,q[ia>>2]=ka;q[ka+24>>2]=ia,q[ka+12>>2]=ka,q[ka+8>>2]=ka;break S}a=q[ia+8>>2],q[a+12>>2]=ka,q[ia+8>>2]=ka,q[ka+24>>2]=0,q[ka+12>>2]=ia,q[ka+8>>2]=a}a=la+8|0;break a}X:if(qa){a=q[ia+28>>2];Y:{if(q[(ja=8652+(a<<2)|0)>>2]==(0|ia)){if(q[ja>>2]=la)break Y;ua=ed(a)&ra,q[2088]=ua;break X}if(!(q[qa+(q[qa+16>>2]==(0|ia)?16:20)>>2]=la))break X}q[la+24>>2]=qa,(a=q[ia+16>>2])&&(q[la+16>>2]=a,q[a+24>>2]=la),(a=q[ia+20>>2])&&(q[la+20>>2]=a,q[a+24>>2]=la)}ka>>>0<=15?(q[ia+4>>2]=3|(a=ka+na|0),q[4+(a=a+ia|0)>>2]=1|q[a+4>>2]):(q[ia+4>>2]=3|na,q[4+(na=ia+na|0)>>2]=1|ka,q[ka+na>>2]=ka,pa&&(a=8388+((ja=pa>>>3)<<3)|0,la=q[2092],ja=(ja=1<>2]:(q[2087]=ja|ma,a),q[a+8>>2]=la,q[ja+12>>2]=la,q[la+12>>2]=a,q[la+8>>2]=ja),q[2092]=na,q[2089]=ka),a=ia+8|0}return L=16+sa|0,a}function ra(a,va,wa,xa,ya,za,Aa){var Qa,Ta,Ba,Ca=0,Da=0,Fa=0,Ia=0,Ja=0,Ka=0,Ma=0,Na=0,Oa=0,Pa=0,Ra=0,Sa=0;q[76+(L=Ba=L-80|0)>>2]=va,Ta=55+Ba|0,Qa=56+Ba|0,va=0;a:{b:{c:for(;;){(0|Oa)<0||(Oa=(2147483647-Oa|0)<(0|va)?(q[2086]=61,-1):va+Oa|0);e:{f:{g:{h:{i:{j:{k:{l:{m:{n:{o:{p:{q:{if(Ia=q[76+Ba>>2],Fa=r[0|(va=Ia)]){for(;;){r:{s:{t:if(Ca=255&Fa){if(37!=(0|Ca))break s;for(Fa=va;;){if(37!=r[va+1|0])break t;if(q[76+Ba>>2]=Ca=va+2|0,Fa=Fa+1|0,Da=r[va+2|0],va=Ca,37!=(0|Da))break}}else Fa=va;if(va=Fa-Ia|0,a&&Z(a,Ia,va),va)continue c;Pa=-1,Ja=!ha(o[q[76+(Ca=Ba)>>2]+(Fa=1)|0]),va=q[76+Ba>>2],Ja|36!=r[va+2|0]||(Pa=o[va+1|0]+-48|0,Ra=1,Fa=3),q[Ca+76>>2]=va=Fa+va|0;u:if(31<(Da=(Ma=o[(Fa=0)|va])+-32|0)>>>0)Ca=va;else if(Ca=va,75913&(Da=1<>2]=Ca=va+1|0,Fa|=Da,31<(Da=(Ma=o[va+1|0])+-32|0)>>>0)break u;if(va=Ca,!(75913&(Da=1<>2],36==r[va+2|0]))q[((o[va+1|0]<<2)+ya|0)-192>>2]=10,Na=q[((o[va+1|0]<<3)+xa|0)-384>>2],Ra=1,va=va+3|0;else{if(Ra)break b;Na=Ra=0,a&&(va=q[wa>>2],q[wa>>2]=va+4,Na=q[va>>2]),va=q[76+Ba>>2]+1|0}q[Ja+76>>2]=va,-1<(0|Na)||(Na=0-Na|0,Fa|=8192)}else{if((0|(Na=Ha(76+Ba|0)))<0)break b;va=q[76+Ba>>2]}if(Da=-1,46==r[0|va])if(42==r[va+1|0])if(ha(o[va+2|0])&&(va=q[76+Ba>>2],36==r[va+3|0]))q[((o[va+2|0]<<2)+ya|0)-192>>2]=10,Da=q[((o[va+2|0]<<3)+xa|0)-384>>2],q[76+Ba>>2]=va=va+4|0;else{if(Ra)break b;Da=a?(va=q[wa>>2],q[wa>>2]=va+4,q[va>>2]):0,va=q[76+Ba>>2]+2|0,q[76+Ba>>2]=va}else q[76+Ba>>2]=va+1,Da=Ha(76+Ba|0),va=q[76+Ba>>2];for(Ca=0;;){if(Sa=Ca,Ka=-1,57>>0)break a;if(q[76+Ba>>2]=Ma=va+1|0,Ca=o[0|va],va=Ma,!((Ca=r[3295+(Ca+w(Sa,58)|0)|0])+-1>>>0<8))break}if(!Ca)break a;A:{B:{C:{if(19==(0|Ca)){if((0|Pa)<=-1)break C;break a}if((0|Pa)<0)break B;q[(Pa<<2)+ya>>2]=Ca,Ca=q[4+(va=(Pa<<3)+xa|0)>>2],q[64+Ba>>2]=q[va>>2],q[68+Ba>>2]=Ca}if(va=0,a)break A;continue c}if(!a)break e;Ga(64+Ba|0,Ca,wa,Aa),Ma=q[76+Ba>>2]}if(Ja=-65537&Fa,Fa=8192&Fa?Ja:Fa,Pa=3336,Ca=Qa,va=o[Ma+-1|(Ka=0)],(Ma=(va=Sa&&3==(15&va)?-33&va:va)+-88|0)>>>0<=32)break r;D:{E:{F:{G:{if(6<(Ja=va+-65|0)>>>0){if(83!=(0|va))break f;if(!Da)break G;Ca=q[64+Ba>>2];break E}switch(Ja-1|0){case 1:break F;case 0:case 2:break f;default:break q}}_(a,32,Na,va=0,Fa);break D}q[12+Ba>>2]=0,q[8+Ba>>2]=q[64+Ba>>2],q[64+Ba>>2]=8+Ba,Da=-1,Ca=8+Ba|0}va=0;H:{for(;;){if(!(Ia=q[Ca>>2]))break H;if((Ja=(0|(Ia=Ea(4+Ba|0,Ia)))<0)|Da-va>>>0>>0)break;if(Ca=Ca+4|0,!((va=va+Ia|0)>>>0>>0))break H}if(Ka=-1,Ja)break a}if(_(a,32,Na,va,Fa),va)for(Da=0,Ca=q[64+Ba>>2];;){if(!(Ia=q[Ca>>2]))break D;if((0|va)<(0|(Da=(Ia=Ea(4+Ba|0,Ia))+Da|0)))break D;if(Z(a,4+Ba|0,Ia),Ca=Ca+4|0,!(Da>>>0>>0))break}else va=0}_(a,32,Na,va,8192^Fa),va=(0|va)<(0|Na)?Na:va;continue c}q[76+Ba>>2]=Ca=va+1|0,Fa=r[va+1|0],va=Ca;continue}break}switch(Ma-1|0){case 28:break i;case 21:break j;case 23:break l;case 22:break m;case 11:case 16:break n;case 10:break o;case 26:break p;case 8:case 12:case 13:case 14:break q;case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 9:case 15:case 17:case 18:case 19:case 20:case 24:case 25:case 27:case 29:case 30:break f;default:break k}}if(Ka=Oa,a)break a;if(!Ra)break e;for(va=1;;){if(a=q[(va<<2)+ya>>2]){if(Ga((va<<3)+xa|0,a,wa,Aa),10!=(0|(va=va+(Ka=1)|0)))continue;break a}break}if(Ka=1,9>>0)break a;if(Ka=-1,q[(va<<2)+ya>>2])break a;for(;!q[((va=va+1|0)<<2)+ya>>2]&&10!=(0|va););Ka=va>>>0<10?-1:1;break a}va=0|n[za](a,v[64+Ba>>3],Na,Da,Fa,va);continue}Ca=(va=La(Ia=(va=q[64+Ba>>2])||3346,Da))||Da+Ia|0,Fa=Ja,Da=va?va-Ia|0:Da;break f}o[55+Ba|0]=q[64+Ba>>2],Da=1,Ia=Ta,Fa=Ja;break f}if(va=Ja=q[68+Ba>>2],Ia=q[64+Ba>>2],(0|va)<-1||(0|va)<=-1&&!(4294967295>>0)){va=0-(va+(0>>0)|0)|0,q[64+Ba>>2]=Ia=0-Ia|0,q[68+Ba>>2]=va,Ka=1,Pa=3336;break h}if(2048&Fa){Ka=1,Pa=3337;break h}Pa=(Ka=1&Fa)?3338:3336;break h}if(Ia=function(a,Il,Rm){if(a|Il)for(;o[0|(Rm=Rm+-1|0)]=7&a|48,(a=(7&Il)<<29|a>>>3)|(Il>>>=3););return Rm}(q[64+Ba>>2],q[68+Ba>>2],Qa),!(8&Fa))break g;Da=(0|(va=Qa-Ia|0))<(0|Da)?Da:va+1|0;break g}Da=8>>0?Da:8,Fa|=8,va=120}if(Ia=function(a,Il,Rm,Sm){if(a|Il)for(;o[0|(Rm=Rm+-1|0)]=r[3824+(15&a)|0]|Sm,(a=(15&Il)<<28|a>>>4)|(Il>>>=4););return Rm}(q[64+Ba>>2],q[68+Ba>>2],Qa,32&va),!(8&Fa)|!(q[64+Ba>>2]|q[68+Ba>>2]))break g;Pa=3336+(va>>>4)|0,Ka=2;break g}if(7<(Ca=255&Sa)>>>(va=0))continue;switch(Ca-1|0){default:case 0:q[q[64+Ba>>2]>>2]=Oa;continue;case 1:Ca=q[64+Ba>>2],q[Ca>>2]=Oa,q[Ca+4>>2]=Oa>>31;continue;case 2:p[q[64+Ba>>2]>>1]=Oa;continue;case 3:o[q[64+Ba>>2]]=Oa;continue;case 5:q[q[64+Ba>>2]>>2]=Oa;continue;case 4:continue;case 6:}Ca=q[64+Ba>>2],q[Ca>>2]=Oa,q[Ca+4>>2]=Oa>>31;continue}Ia=q[64+Ba>>2],va=q[68+Ba>>2],Pa=3336}Ia=ga(Ia,va,Qa)}Fa=-1<(0|Da)?-65537&Fa:Fa,Da=!!((Ja=va=q[68+Ba>>2])|(Ma=q[64+Ba>>2]))|Da?(0|(va=!(Ja|Ma)+(Qa-Ia|0)|0))<(0|Da)?Da:va:(Ia=Qa,0)}_(a,32,va=(0|Na)<(0|(Ca=(Da=(0|Da)<(0|(Ja=Ca-Ia|0))?Ja:Da)+Ka|0))?Ca:Na,Ca,Fa),Z(a,Pa,Ka),_(a,48,va,Ca,65536^Fa),_(a,48,Da,Ja,0),Z(a,Ia,Ja),_(a,32,va,Ca,8192^Fa);continue}break}Ka=0;break a}Ka=-1}return L=80+Ba|0,Ka}function sa(a){var ya,va=0,wa=0,xa=0,za=0,xa=4,wa=1439;a:if(va=r[0|a]){for(;!((0|(ya=r[0|wa]))!=(0|va)||!(xa=xa+-1|0)|!ya);)if(wa=wa+1|0,va=r[a+1|0],a=a+1|0,!va)break a;za=va}return(255&za)-r[0|wa]|0}function ta(a,Aa,Ea){var La,Ga,Ha=0,Ua=0,Va=0;q[(L=Ga=L-240|0)>>2]=a,Ua=1;a:if(!((0|Aa)<2))for(Ha=a;;){if(Ha=(La=Ha+-4|0)-q[((Va=Aa+-2|0)<<2)+Ea>>2]|0,0<=(0|n[5](a,Ha))&&-1<(0|n[5](a,La)))break a;if(a=(Ua<<2)+Ga|0,0<=(0|n[5](Ha,La))?(q[a>>2]=Ha,Va=Aa+-1|0):Ha=q[a>>2]=La,Ua=Ua+1|0,(0|Va)<2)break a;a=q[Ga>>2],Aa=Va}Na(Ga,Ua),L=240+Ga|0}function ua(a){var Ea,$a,Aa=0;if(x(0),function(a){var Vg,Wg;q[a+428>>2]&&(Wg=q[a+332>>2],$(q[a+460>>2],q[a+436>>2],Vg=Wg<<2),$(q[a+464>>2],q[a+440>>2],Vg),$(q[a+468>>2],q[a+448>>2],Vg),r[q[a>>2]+4|0]<4||($(q[a+472>>2],q[a+452>>2],Vg=Wg<<4),$(q[a+476>>2],q[a+456>>2],Vg)))}(a),function(a){var ke,le,me,fe=0,ge=x(0),he=x(0),ie=0,je=x(0);x(0),x(0);if(1<=(0|(ie=q[a>>2])))for(me=(fe=q[a+4>>2])+w(ie,52)|0,a=q[a+12>>2];ge=u[a>>2],u[fe+44>>2]!=(ge=(ke=q[fe+16>>2])?(he=ge,ge=u[fe+4>>2],je=u[fe+12>>2],he=x(x(he-ge)/je),le=x(C(he)),ie=x(y(le))>2],he=u[fe+8>>2],ge>2]=ge,q[fe+48>>2]=1):q[fe+48>>2]=0,ke||(u[a>>2]=ge),a=a+4|0,(fe=fe+52|0)>>>0>>0;);}(a+540|0),function(a){var Wd,Xd,ae,ce,de,ee,Rd=0,Sd=0,Td=x(0),Ud=0,Vd=x(0),Yd=(x(0),x(0),0),Zd=x(0),_d=0,$d=0,be=0;x(0);if(1<=(0|(Ud=q[a+540>>2])))for(de=(Yd=q[a+544>>2])+w(Ud,52)|0,ee=q[a+644>>2];;){a:if(!(q[Yd>>2]||(0|(Ud=q[Yd+32>>2]))<1))if(ae=(a=q[Yd+28>>2])+w(Ud,28)|0,ce=u[Yd+24>>2],Xd=u[Yd+20>>2],Wd=u[Yd+44>>2],ee)for(;;){Zd=x($d=0);h:{i:{j:{if((0|(Sd=q[a>>2]))<1)Rd=Ud=0;else if(_d=q[a+4>>2],Vd=u[_d>>2],Td=x(Vd-Xd),1==(0|Sd))Ud=Wd>2],!(Wd>2],Wd>2])break h;break i}Rd=Sd+-1|0,Ud=1}_d=(Sd=(Vd=u[a+12>>2])!=Zd)&(Zd==x(0)|Vd==x(0))|q[a+8>>2]!=(0|Rd),$d=Ud}if(q[a+20>>2]=_d,q[a+24>>2]=Sd,u[a+12>>2]=Zd,q[a+16>>2]=$d,q[a+8>>2]=Rd,!((a=a+28|0)>>>0>>0))break}else{if(!q[Yd+48>>2])for(;;)if(q[a+20>>2]=0,!((a=a+28|(q[a+24>>2]=0))>>>0>>0))break a;for(;;){Zd=x($d=0);b:{c:{d:{e:if(!(((Sd=0)|(Rd=q[(_d=a)>>2]))<1)){if(Ud=q[a+4>>2],Vd=u[Ud>>2],Td=x(Vd-Xd),1!=(0|Rd)){if(!(Wd>2],!(Wd>2],Wd>2]))break b}$d=Ud,be=(Sd=(Vd=u[a+12>>2])!=Zd)&(Zd==x(0)|Vd==x(0))|q[a+8>>2]!=(0|Rd)}if(q[_d+20>>2]=be,q[a+24>>2]=Sd,u[a+12>>2]=Zd,q[a+16>>2]=$d,q[a+8>>2]=Rd,!((a=a+28|0)>>>0>>0))break}}if(!((Yd=Yd+52|0)>>>0>>0))break}}(a),function(a){var rd,sd,td,ud,vd,kd=0,ld=x(0),md=0,nd=0,od=x(0),pd=0,qd=x(0);x(0);if(!(r[q[a>>2]+4|0]<4||(0|(kd=q[a+540>>2]))<1))for(ud=(pd=q[a+544>>2])+w(kd,52)|0,vd=q[a+644>>2];;){b:if(1==q[pd>>2]&&!((0|(kd=q[pd+40>>2]))<1))if(sd=(a=q[pd+36>>2])+w(kd,28)|0,rd=u[pd+44>>2],vd)for(;;){qd=x(kd=0);d:if(!((0|(nd=q[a>>2]))<2||(md=q[a+4>>2],rd<=(ld=u[md>>2])))){kd=1;e:if(!(rd<(od=u[md+4>>2]))){for(;ld=od,(0|nd)!=(0|(kd=kd+1|0));)if(rd<(od=u[md+(kd<<2)>>2]))break e;kd=nd+-1|0;break d}qd=x(x(rd-ld)/x(od-ld)),kd=kd+-1|0}if(ld=u[a+16>>2],u[a+16>>2]=qd,nd=q[a+12>>2],q[a+12>>2]=kd,q[a+24>>2]=md=ld!=qd,q[a+20>>2]=md&(qd==x(0)|ld==x(0))|(0|kd)!=(0|nd),!((a=a+28|0)>>>0>>0))break}else{if(!q[pd+48>>2])for(;;)if(q[a+20>>2]=0,!((a=a+28|(q[a+24>>2]=0))>>>0>>0))break b;for(;;){qd=x(nd=0);c:if(!((0|(td=q[a>>2]))<2||(md=q[a+4>>2],rd<=(ld=u[md>>2])))){if(kd=1,!(rd<(od=u[md+4>>2])))for(nd=td+-1|0;;){if(ld=od,(0|kd)==(0|nd))break c;if(rd<(od=u[md+((kd=kd+1|0)<<2)>>2]))break}qd=x(x(rd-ld)/x(od-ld)),nd=kd+-1|0}if(ld=u[a+16>>2],u[a+16>>2]=qd,kd=q[a+12>>2],q[a+12>>2]=nd,q[a+24>>2]=md=ld!=qd,q[a+20>>2]=md&(qd==x(0)|ld==x(0))|(0|kd)!=(0|nd),!((a=a+28|0)>>>0>>0))break}}if(!((pd=pd+52|0)>>>0>>0))break}}(a),function(a){var Id,Jd,Md,Nd,Od,Pd,Qd,wd=0,xd=0,yd=0,zd=0,Ad=0,Bd=0,Cd=0,Dd=x(0),Ed=0,Gd=0,Hd=0,Kd=0,Ld=0;if(1<=(0|(xd=q[a+564>>2])))for(Pd=(Ad=q[a+568>>2])+w(xd,36)|0,Nd=q[a+644>>2];;){a:{if(!(Bd=((yd=zd=xd=0)|(Jd=q[Ad+4>>2]))<1))for(Ed=q[Ad>>2],a=Kd=0;;){if(wd=q[Ed+(a<<2)>>2],q[wd+16>>2]){wd=1,Ld=0;break a}if(yd=yd||q[wd+24>>2],xd=xd||q[wd+20>>2],zd=(u[wd+12>>2]!=x(0))+zd|0,(0|Jd)==(0|(a=a+1|0)))break}if(wd=0,(Kd=Nd?1:yd)|(Ld=Nd?1:xd)&&(q[Ad+12>>2]=Ed=1<>2],Od=q[Ad>>2],yd=(a=q[Ad+16>>2])+(Cd=Ed<<2)|0,yd=ca(a,0,4+((-1^a)+((a=a+4|0)>>>0>>0?yd:a)|0)&-4),Cd=xd+Cd|0,a=xd;q[a>>2]=1065353216,(a=a+4|0)>>>0>>0;);if(!Bd){if(Bd=0,Cd=wd=1,zd)for(;;){if(zd=q[(Bd<<2)+Od>>2],Gd=q[zd+8>>2],Hd=w(Gd,wd),(Dd=u[zd+12>>2])!=x(a=0)){for(q[yd>>2]=Hd+q[yd>>2],u[xd>>2]=x(x(1)-Dd)*u[xd>>2],Gd=w(Gd+(a=1)|0,wd);Dd=u[zd+12>>2],Qd=q[(Md=(Id=a<<2)+yd|0)>>2],q[Md>>2]=Qd+((Md=a&Cd)?Gd:Hd),u[(Id=xd+Id|0)>>2]=(Md?Dd:x(x(1)-Dd))*u[Id>>2],(0|Ed)!=(0|(a=a+1|0)););Cd<<=1}else for(;q[(Gd=yd+(a<<2)|0)>>2]=Hd+q[Gd>>2],(0|Ed)!=(0|(a=a+1|0)););if(wd=w(q[zd>>2],wd),(0|Jd)==(0|(Bd=Bd+1|0)))break}else for(;;){if(zd=q[(Bd<<2)+Od>>2],Cd=w(q[zd+8>>2],wd),(Dd=u[zd+12>>2])!=x(a=0))q[yd>>2]=Cd+q[yd>>2],u[xd>>2]=x(x(1)-Dd)*u[xd>>2];else for(;q[(Hd=yd+(a<<2)|0)>>2]=Cd+q[Hd>>2],(0|Ed)!=(0|(a=a+1|0)););if(wd=w(q[zd>>2],wd),(0|Jd)==(0|(Bd=Bd+1|0)))break}wd=0}}}if(q[Ad+32>>2]=wd,q[Ad+24>>2]=Ld,q[Ad+28>>2]=Kd,!((Ad=Ad+36|0)>>>0>>0))break}}(a),function(a){var gd,hd,id,jd,Wc=x(0),Xc=0,Yc=0,Zc=0,_c=0,$c=0,ad=x(0),bd=x(0),cd=x(0),dd=0,ed=0,fd=0;if(!(r[q[a>>2]+4|0]<4||(0|(Xc=q[a+588>>2]))<1))for(jd=(Zc=q[a+592>>2])+w(Xc,48)|0,gd=q[a+644>>2];;){if(a=q[Zc>>2],(ed=gd?1:q[a+20>>2])|(fd=gd?1:q[a+24>>2])){c:{d:{$c=Zc,_c=q[a+8>>2],Xc=q[a+12>>2],Wc=u[a+16>>2],a=(0|_c)!=(0|Xc);e:{if(Wc!=x(0)){if(a=Xc+1|0,(0|Xc)==(0|_c)){q[Zc+8>>2]=ed=1,Wc=x(x(1)-Wc),fd=1;break e}a=(0|a)==(0|_c)?1:2}if(q[$c+8>>2]=a,!fd)break d;a=Xc}u[Zc+24>>2]=Wc,u[Zc+20>>2]=x(1)-Wc;break c}fd=0,a=Xc}ed?(q[Zc+12>>2]=a,q[Zc+16>>2]=a+1):ed=0}else ed=fd=0;g:if((0|(hd=q[Zc+36>>2]))<1)cd=x(1);else{if(id=q[Zc+40>>2],a=0,cd=x(1),!gd)for(;;){h:{i:{if(Xc=q[(a<<2)+id>>2],Yc=q[Xc>>2]){if(!q[Yc+48>>2]){Wc=u[Xc+16>>2];break h}if((0|(_c=q[Xc+12>>2]))<1){Wc=x(1),u[Xc+16>>2]=1;break h}if(dd=q[Xc+8>>2],1!=(0|_c)&&(ad=u[Yc+44>>2],$c=q[Xc+4>>2],!(ad<=(bd=u[$c>>2]))))break i;Wc=u[dd>>2],u[Xc+16>>2]=Wc;break h}q[Xc+16>>2]=1065353216,Wc=x(1);break h}Yc=1;j:if(!(ad<(Wc=u[$c+4>>2]))){for(;bd=Wc,(0|_c)!=(0|(Yc=Yc+1|0));)if(ad<(Wc=u[$c+(Yc<<2)>>2]))break j;Wc=u[(dd+(_c<<2)|0)-4>>2],u[Xc+16>>2]=Wc;break h}$c=Xc,Wc=x(x(ad-bd)/x(Wc-bd)),Wc=x(x(Wc*u[(Xc=dd+(Yc<<2)|0)>>2])+x(u[Xc+-4>>2]*x(x(1)-Wc))),u[$c+16>>2]=Wc}if(cd=cd>2],Yc=q[Xc>>2],Wc=x(1);l:if(Yc&&(dd=q[Xc+12>>2],Wc=x(1),!((0|dd)<1))&&(_c=q[Xc+8>>2],Wc=u[_c>>2],1!=(0|dd))){m:{if(ad=u[Yc+44>>2],$c=q[Xc+4>>2],ad<=(bd=u[$c>>2])){Wc=u[_c>>2];break l}if(Yc=1,!(ad<(Wc=u[$c+4>>2]))){for(;bd=Wc,(0|dd)!=(0|(Yc=Yc+1|0));)if(ad<(Wc=u[$c+(Yc<<2)>>2]))break m;Wc=u[(_c+(dd<<2)|0)-4>>2];break l}}Wc=x(x(ad-bd)/x(Wc-bd)),Wc=x(x(Wc*u[(Yc=_c+(Yc<<2)|0)>>2])+x(u[Yc+-4>>2]*x(x(1)-Wc)))}if(cd=cd<(u[Xc+16>>2]=Wc)?cd:Wc,(0|hd)==(0|(a=a+1|0)))break}}if(q[Zc+32>>2]=fd,q[Zc+28>>2]=ed,u[Zc+44>>2]=cd,!((Zc=Zc+48|0)>>>0>>0))break}}(a),1<=(0|(Ea=q[a+4>>2])))for(Ea=(Aa=q[a+52>>2])+(Ea<<2)|0;$a=u[Aa>>2],u[Aa>>2]=$a>>0>>0;);!function(a){var Fe,Ge,He,De=0,Ee=0;if(1<=(0|(Ee=q[a+4>>2])))for(He=(De=q[a+8>>2])+w(Ee,12)|0,a=Fe=q[a+40>>2];Ee=0,q[De+8>>2]&&(Ge=q[De+4>>2],!q[(Ge<<2)+Fe>>2]&&-1!=(0|Ge)||(Ee=!q[q[De>>2]+32>>2])),q[a>>2]=Ee,a=a+4|0,(De=De+12|0)>>>0>>0;);}(a),function(a){var rg,vg,wg,xg,yg,zg,Ag,pg=0,qg=0,sg=0,tg=0,ug=0;if(1<=(0|(vg=q[a+4>>2])))for(xg=q[a+8>>2],wg=q[a>>2],yg=q[wg+724>>2];;){if(rg=q[w(tg,12)+xg>>2],(q[rg+28>>2]||q[rg+24>>2])&&(q[(pg=tg<<2)+q[a+28>>2]>>2]=q[rg+12>>2],q[rg+24>>2])&&!((0|(sg=q[rg+12>>2]))<1))for(sg=(qg=q[rg+16>>2])+(sg<<2)|0,zg=q[pg+yg>>2],pg=q[a+36>>2]+(ug<<2)|0,Ag=q[wg+976>>2];q[pg>>2]=q[(q[qg>>2]+zg<<2)+Ag>>2],pg=pg+4|0,(qg=qg+4|0)>>>0>>0;);if(q[rg+28>>2]&&!((0|(pg=q[rg+12>>2]))<1))for(sg=(qg=q[rg+20>>2])+(pg<<2)|0,pg=q[a+32>>2]+(ug<<2)|0;q[pg>>2]=q[qg>>2],pg=pg+4|0,(qg=qg+4|0)>>>0>>0;);if(ug=q[rg+8>>2]+ug|0,(0|vg)==(0|(tg=tg+1|0)))break}}(a),n[q[1808]](a+12|0,q[a+36>>2],q[a+44>>2],q[a+40>>2]),function(a){var xe,ye,ze,Ae,Be,Ce,ue=0,ve=0,we=0;if(1<=(0|(we=q[a+304>>2])))for(ze=(ue=q[a+308>>2])+(we<<5)|0,Ae=q[a+264>>2],Be=q[a+144>>2],Ce=q[a+40>>2],we=ye=q[a+312>>2];xe=we,ve=0,a=ve=!q[ue+28>>2]||-1!=(0|(a=q[ue+4>>2]))&&(ve=0,!q[(a<<2)+Ce>>2])||-1!=(0|(a=q[ue+8>>2]))&&(ve=0,!q[(a<<2)+ye>>2])?ve:!q[q[ue>>2]+32>>2],q[xe>>2]=a,(xe=q[ue+12>>2])>>>0<=1?xe-1?q[(q[ue+16>>2]<<2)+Be>>2]=a:q[(q[ue+16>>2]<<2)+Ae>>2]=a:Y(4,1372,0),we=we+4|0,(ue=ue+32|0)>>>0>>0;);}(a),function(a){var gg,hg,ig,jg,kg,lg,mg,ng,og,Uf=0,Vf=0,Wf=0,Xf=0,Yf=0,Zf=0,_f=0,$f=0,ag=0,bg=0,cg=0,dg=0,eg=0,fg=0,Yf=q[a>>2];if(1<=(0|($f=q[a+56>>2]))){for(ag=q[a+60>>2],bg=q[Yf+1052>>2],cg=q[Yf+784>>2];;){if(Uf=q[ag+w(Zf,24)>>2],(q[Uf+28>>2]||q[Uf+24>>2])&&(q[(Vf=Zf<<2)+q[a+80>>2]>>2]=q[Uf+12>>2],q[Uf+24>>2])&&!((0|(Xf=q[Uf+12>>2]))<1))for(dg=(Wf=q[Uf+16>>2])+(Xf<<2)|0,eg=q[Vf+cg>>2],Vf=(Xf=_f<<2)+q[a+92>>2]|0,Xf=Xf+q[a+88>>2]|0;fg=eg+q[Wf>>2]<<2,q[Vf>>2]=bg+(q[fg+q[Yf+984>>2]>>2]<<2),q[Xf>>2]=q[fg+q[Yf+980>>2]>>2],Xf=Xf+4|0,Vf=Vf+4|0,(Wf=Wf+4|0)>>>0>>0;);if(q[Uf+28>>2]&&!((0|(Vf=q[Uf+12>>2]))<1))for(Xf=(Wf=q[Uf+20>>2])+(Vf<<2)|0,Vf=q[a+84>>2]+(_f<<2)|0;q[Vf>>2]=q[Wf>>2],Vf=Vf+4|0,(Wf=Wf+4|0)>>>0>>0;);if(_f=q[Uf+8>>2]+_f|0,(0|$f)==(0|(Zf=Zf+1|0)))break}Yf=q[a>>2]}if(!(r[Yf+4|0]<4||(0|(eg=q[a+56>>2]))<1))for(fg=q[Yf+792>>2],gg=q[a+60>>2],Wf=_f=0;;){if(Zf=q[w(Wf,24)+gg>>2],q[Zf+24>>2]&&!((0|(Uf=q[Zf+12>>2]))<1))for(hg=(Vf=q[Zf+16>>2])+(Uf<<2)|0,ig=q[fg+(Wf<<2)>>2],Xf=(Uf=_f<<2)+q[a+96>>2]|0,$f=Uf+q[a+100>>2]|0,ag=Uf+q[a+104>>2]|0,bg=Uf+q[a+108>>2]|0,cg=Uf+q[a+112>>2]|0,dg=Uf+q[a+116>>2]|0,jg=q[Yf+1308>>2],kg=q[Yf+1304>>2],lg=q[Yf+1300>>2],mg=q[Yf+1296>>2],ng=q[Yf+1292>>2],og=q[Yf+1288>>2];Uf=q[Vf>>2]+ig<<2,q[Xf>>2]=q[Uf+og>>2],q[$f>>2]=q[Uf+ng>>2],q[ag>>2]=q[Uf+mg>>2],q[bg>>2]=q[Uf+lg>>2],q[cg>>2]=q[Uf+kg>>2],q[dg>>2]=q[Uf+jg>>2],dg=dg+4|0,cg=cg+4|0,bg=bg+4|0,ag=ag+4|0,$f=$f+4|0,Xf=Xf+4|0,(Vf=Vf+4|0)>>>0>>0;);if(_f=q[Zf+8>>2]+_f|0,(0|eg)==(0|(Wf=Wf+1|0)))break}}(a),function(a){var xf=0,yf=0,Af=0,Bf=0,Cf=0,Df=0,Ef=0,Ff=0,Gf=0,Hf=0,If=0,Jf=0,Kf=0,Lf=0,Mf=0,Nf=0,Of=0,Pf=0,Qf=0,Rf=0,Sf=0,Tf=q[a+168>>2],zf=q[a>>2];if(1<=(0|(Kf=q[a+164>>2])))for(Mf=q[zf+816>>2];;){if(Af=q[w(Ef,12)+Tf>>2],(q[Af+28>>2]||q[Af+24>>2])&&(q[(Ff=Ef<<2)+q[a+188>>2]>>2]=q[Af+12>>2],q[Af+24>>2])){if(yf=q[Af+16>>2],Lf=q[Ff+Mf>>2],1<=(0|(xf=q[Af+12>>2])))for(Nf=yf+(xf<<2)|0,Bf=(xf=Df<<2)+q[a+200>>2]|0,Gf=xf+q[a+204>>2]|0,Hf=xf+q[a+208>>2]|0,If=xf+q[a+212>>2]|0,Jf=xf+q[a+196>>2]|0,Of=q[zf+996>>2],Pf=q[zf+1012>>2],Qf=q[zf+1008>>2],Rf=q[zf+1004>>2],Sf=q[zf+1e3>>2],xf=yf;Cf=Lf+q[xf>>2]<<2,q[Bf>>2]=q[Cf+Sf>>2],q[Gf>>2]=q[Cf+Rf>>2],q[Hf>>2]=q[Cf+Qf>>2],q[If>>2]=q[Cf+Pf>>2],q[Jf>>2]=q[Cf+Of>>2],Jf=Jf+4|0,If=If+4|0,Hf=Hf+4|0,Gf=Gf+4|0,Bf=Bf+4|0,(xf=xf+4|0)>>>0>>0;);xf=Lf+q[yf>>2]<<2,q[Ff+q[a+288>>2]>>2]=q[xf+q[zf+1016>>2]>>2],q[Ff+q[a+292>>2]>>2]=q[xf+q[zf+1020>>2]>>2]}if(q[Af+28>>2]&&!((0|(yf=q[Af+12>>2]))<1))for(yf=(xf=q[Af+20>>2])+(yf<<2)|0,Bf=q[a+192>>2]+(Df<<2)|0;q[Bf>>2]=q[xf>>2],Bf=Bf+4|0,(xf=xf+4|0)>>>0>>0;);if(Df=q[Af+8>>2]+Df|0,(0|Kf)==(0|(Ef=Ef+1|0)))break}if(!(r[zf+4|0]<4||(0|(Ff=q[a+164>>2]))<1))for(Lf=q[zf+824>>2],Df=Af=0;;){if(Cf=q[w(Df,12)+Tf>>2],q[Cf+24>>2]&&!((0|(xf=q[Cf+12>>2]))<1))for(Kf=(Bf=q[Cf+16>>2])+(xf<<2)|0,Mf=q[Lf+(Df<<2)>>2],Gf=(yf=Af<<2)+q[a+216>>2]|0,Hf=yf+q[a+220>>2]|0,If=yf+q[a+224>>2]|0,Jf=yf+q[a+228>>2]|0,xf=yf+q[a+232>>2]|0,Ef=yf+q[a+236>>2]|0,Nf=q[zf+1308>>2],Of=q[zf+1304>>2],Pf=q[zf+1300>>2],Qf=q[zf+1296>>2],Rf=q[zf+1292>>2],Sf=q[zf+1288>>2];yf=Mf+q[Bf>>2]<<2,q[Gf>>2]=q[yf+Sf>>2],q[Hf>>2]=q[yf+Rf>>2],q[If>>2]=q[yf+Qf>>2],q[Jf>>2]=q[yf+Pf>>2],q[xf>>2]=q[yf+Of>>2],q[Ef>>2]=q[yf+Nf>>2],Ef=Ef+4|0,xf=xf+4|0,Jf=Jf+4|0,If=If+4|0,Hf=Hf+4|0,Gf=Gf+4|0,(Bf=Bf+4|0)>>>0>>0;);if(Af=q[Cf+8>>2]+Af|0,(0|Ff)==(0|(Df=Df+1|0)))break}}(a),function(a){var yk,qk=0,rk=0,sk=0,tk=0,uk=0,vk=0,wk=0,xk=0,qk=a- -64|0;if(n[q[1807]](qk,q[a+88>>2],q[a+148>>2],q[a+144>>2]),n[q[1809]](qk,q[a+92>>2],q[a+152>>2],q[q[a>>2]+796>>2],2,q[a+144>>2]),!(r[q[a>>2]+4|0]<4||(n[q[1807]](qk,q[a+96>>2],q[a+120>>2],q[a+144>>2]),n[q[1807]](qk,q[a+100>>2],q[a+124>>2],q[a+144>>2]),n[q[1807]](qk,q[a+104>>2],q[a+128>>2],q[a+144>>2]),n[q[1807]](qk,q[a+108>>2],q[a+132>>2],q[a+144>>2]),n[q[1807]](qk,q[a+112>>2],q[a+136>>2],q[a+144>>2]),n[q[1807]](qk,q[a+116>>2],q[a+140>>2],q[a+144>>2]),(0|(vk=q[a+56>>2]))<1))){for(wk=q[a+128>>2],xk=q[a+124>>2],yk=q[a+120>>2],rk=q[a+156>>2],qk=0;q[(sk=tk<<2)+rk>>2]=q[(uk=qk<<2)+yk>>2],q[rk+(4|sk)>>2]=q[uk+xk>>2],q[rk+(8|sk)>>2]=q[uk+wk>>2],tk=tk+4|0,(0|vk)!=(0|(qk=qk+1|0)););for(rk=q[a+160>>2],uk=q[a+140>>2],wk=q[a+136>>2],xk=q[a+132>>2],qk=a=0;q[(tk=a<<2)+rk>>2]=q[(sk=qk<<2)+xk>>2],q[rk+(4|tk)>>2]=q[sk+wk>>2],q[rk+(8|tk)>>2]=q[sk+uk>>2],a=a+4|0,(0|vk)!=(0|(qk=qk+1|0)););}}(a),function(a){var pk,hk=0,ik=0,jk=0,kk=0,lk=0,mk=0,nk=0,ok=0,hk=a+172|0;if(n[q[1807]](hk,q[a+196>>2],q[a+268>>2],q[a+264>>2]),n[q[1807]](hk,q[a+200>>2],q[a+284>>2],q[a+264>>2]),n[q[1807]](hk,q[a+204>>2],q[a+276>>2],q[a+264>>2]),n[q[1807]](hk,q[a+208>>2],q[a+280>>2],q[a+264>>2]),n[q[1807]](hk,q[a+212>>2],q[a+272>>2],q[a+264>>2]),!(r[q[a>>2]+4|0]<4||(n[q[1807]](hk,q[a+216>>2],q[a+240>>2],q[a+264>>2]),n[q[1807]](hk,q[a+220>>2],q[a+244>>2],q[a+264>>2]),n[q[1807]](hk,q[a+224>>2],q[a+248>>2],q[a+264>>2]),n[q[1807]](hk,q[a+228>>2],q[a+252>>2],q[a+264>>2]),n[q[1807]](hk,q[a+232>>2],q[a+256>>2],q[a+264>>2]),n[q[1807]](hk,q[a+236>>2],q[a+260>>2],q[a+264>>2]),(0|(mk=q[a+164>>2]))<1))){for(nk=q[a+248>>2],ok=q[a+244>>2],pk=q[a+240>>2],ik=q[a+296>>2],hk=0;q[(jk=kk<<2)+ik>>2]=q[(lk=hk<<2)+pk>>2],q[ik+(4|jk)>>2]=q[lk+ok>>2],q[ik+(8|jk)>>2]=q[lk+nk>>2],kk=kk+4|0,(0|mk)!=(0|(hk=hk+1|0)););for(ik=q[a+300>>2],lk=q[a+260>>2],nk=q[a+256>>2],ok=q[a+252>>2],hk=a=0;q[(kk=a<<2)+ik>>2]=q[(jk=hk<<2)+ok>>2],q[ik+(4|kk)>>2]=q[jk+nk>>2],q[ik+(8|kk)>>2]=q[jk+lk>>2],a=a+4|0,(0|mk)!=(0|(hk=hk+1|0)););}}(a),function(a){var re,se,te,oe=0,pe=0,qe=0;if(1<=(0|(pe=q[a+332>>2])))for(re=(oe=q[a+336>>2])+w(pe,20)|0,se=q[a+312>>2],te=q[a+40>>2],a=q[a+424>>2];pe=0,q[oe+12>>2]&&(qe=q[oe+4>>2],q[(qe<<2)+te>>2]||-1==(0|qe))&&(qe=q[oe+8>>2],q[(qe<<2)+se>>2]||-1==(0|qe))&&(pe=!q[q[oe>>2]+32>>2]),q[a>>2]=pe,a=a+4|0,(oe=oe+20|0)>>>0>>0;);}(a),function(a){var pf,qf,rf,sf,tf,uf,vf,wf,$e=0,af=0,bf=0,cf=0,df=0,ef=0,ff=0,gf=0,hf=0,jf=0,kf=0,lf=0,mf=0,nf=0,of=0,cf=q[a>>2];if(1<=(0|(jf=q[a+332>>2]))){for(kf=q[a+336>>2],lf=q[cf+1052>>2],mf=q[cf+856>>2];;){if($e=q[kf+w(ff,20)>>2],(q[$e+28>>2]||q[$e+24>>2])&&(q[(af=ff<<2)+q[a+356>>2]>>2]=q[$e+12>>2],q[$e+24>>2])&&!((0|(df=q[$e+12>>2]))<1))for(nf=(bf=q[$e+16>>2])+(df<<2)|0,of=q[af+mf>>2],af=(ef=gf<<2)+q[a+372>>2]|0,df=ef+q[a+364>>2]|0,ef=ef+q[a+368>>2]|0;hf=of+q[bf>>2]<<2,q[af>>2]=lf+(q[hf+q[cf+1040>>2]>>2]<<2),q[df>>2]=q[hf+q[cf+1032>>2]>>2],q[ef>>2]=q[hf+q[cf+1036>>2]>>2],ef=ef+4|0,df=df+4|0,af=af+4|0,(bf=bf+4|0)>>>0>>0;);if(q[$e+28>>2]&&!((0|(af=q[$e+12>>2]))<1))for(df=(bf=q[$e+20>>2])+(af<<2)|0,af=q[a+360>>2]+(gf<<2)|0;q[af>>2]=q[bf>>2],af=af+4|0,(bf=bf+4|0)>>>0>>0;);if(gf=q[$e+8>>2]+gf|0,(0|jf)==(0|(ff=ff+1|0)))break}cf=q[a>>2]}if(!(r[cf+4|0]<4||(0|(mf=q[a+332>>2]))<1))for(nf=q[cf+864>>2],of=q[a+336>>2],bf=gf=0;;){if(ff=q[of+w(bf,20)>>2],q[ff+24>>2]&&!((0|($e=q[ff+12>>2]))<1))for(pf=(af=q[ff+16>>2])+($e<<2)|0,qf=q[nf+(bf<<2)>>2],df=($e=gf<<2)+q[a+376>>2]|0,ef=$e+q[a+380>>2]|0,hf=$e+q[a+384>>2]|0,jf=$e+q[a+388>>2]|0,kf=$e+q[a+392>>2]|0,lf=$e+q[a+396>>2]|0,rf=q[cf+1308>>2],sf=q[cf+1304>>2],tf=q[cf+1300>>2],uf=q[cf+1296>>2],vf=q[cf+1292>>2],wf=q[cf+1288>>2];$e=q[af>>2]+qf<<2,q[df>>2]=q[$e+wf>>2],q[ef>>2]=q[$e+vf>>2],q[hf>>2]=q[$e+uf>>2],q[jf>>2]=q[$e+tf>>2],q[kf>>2]=q[$e+sf>>2],q[lf>>2]=q[$e+rf>>2],lf=lf+4|0,kf=kf+4|0,jf=jf+4|0,hf=hf+4|0,ef=ef+4|0,df=df+4|0,(af=af+4|0)>>>0>>0;);if(gf=q[ff+8>>2]+gf|0,(0|mf)==(0|(bf=bf+1|0)))break}}(a),function(a){var gk,vj=0,xj=0,yj=0,bk=0,ck=0,dk=0,ek=0,fk=0,vj=a+340|0;if(n[q[1807]](vj,q[a+364>>2],q[a+448>>2],q[a+424>>2]),n[q[1808]](vj,q[a+368>>2],q[a+440>>2],q[a+424>>2]),n[q[1809]](vj,q[a+372>>2],q[a+444>>2],q[q[a>>2]+892>>2],2,q[a+424>>2]),!(r[q[a>>2]+4|0]<4||(n[q[1807]](vj,q[a+376>>2],q[a+400>>2],q[a+424>>2]),n[q[1807]](vj,q[a+380>>2],q[a+404>>2],q[a+424>>2]),n[q[1807]](vj,q[a+384>>2],q[a+408>>2],q[a+424>>2]),n[q[1807]](vj,q[a+388>>2],q[a+412>>2],q[a+424>>2]),n[q[1807]](vj,q[a+392>>2],q[a+416>>2],q[a+424>>2]),n[q[1807]](vj,q[a+396>>2],q[a+420>>2],q[a+424>>2]),(0|(dk=q[a+332>>2]))<1))){for(ek=q[a+408>>2],fk=q[a+404>>2],gk=q[a+400>>2],xj=q[a+452>>2],vj=0;q[(yj=bk<<2)+xj>>2]=q[(ck=vj<<2)+gk>>2],q[xj+(4|yj)>>2]=q[ck+fk>>2],q[xj+(8|yj)>>2]=q[ck+ek>>2],bk=bk+4|0,(0|dk)!=(0|(vj=vj+1|0)););for(xj=q[a+456>>2],ck=q[a+420>>2],ek=q[a+416>>2],fk=q[a+412>>2],vj=a=0;q[(bk=a<<2)+xj>>2]=q[(yj=vj<<2)+fk>>2],q[xj+(4|bk)>>2]=q[yj+ek>>2],q[xj+(8|bk)>>2]=q[yj+ck>>2],a=a+4|0,(0|dk)!=(0|(vj=vj+1|0)););}}(a),function(a){var Re,Ve,We,Xe,Ye,Ze,_e,Pe=0,Qe=0,Se=0,Te=0,Ue=0;if(1<=(0|(Ve=q[a+500>>2])))for(Xe=q[a+504>>2],We=q[a>>2],Ye=q[We+1252>>2];;){if(Re=q[w(Te,24)+Xe>>2],(q[Re+28>>2]||q[Re+24>>2])&&(q[(Pe=Te<<2)+q[a+524>>2]>>2]=q[Re+12>>2],q[Re+24>>2])&&!((0|(Se=q[Re+12>>2]))<1))for(Se=(Qe=q[Re+16>>2])+(Se<<2)|0,Ze=q[Pe+Ye>>2],Pe=q[a+532>>2]+(Ue<<2)|0,_e=q[We+1284>>2];q[Pe>>2]=q[(q[Qe>>2]+Ze<<2)+_e>>2],Pe=Pe+4|0,(Qe=Qe+4|0)>>>0>>0;);if(q[Re+28>>2]&&!((0|(Pe=q[Re+12>>2]))<1))for(Se=(Qe=q[Re+20>>2])+(Pe<<2)|0,Pe=q[a+528>>2]+(Ue<<2)|0;q[Pe>>2]=q[Qe>>2],Pe=Pe+4|0,(Qe=Qe+4|0)>>>0>>0;);if(Ue=q[Re+8>>2]+Ue|0,(0|Ve)==(0|(Te=Te+1|0)))break}}(a),n[q[1807]](a+508|0,q[a+532>>2],q[a+536>>2],0),function(a){var Ek,Fk,Gk,Hk,Ik,Jk,zk=x(0),Ak=0,Bk=0,Ck=0,Dk=0;x(0);if(L=Ek=L-16|0,Ck=q[a>>2],!(r[Ck+4|0]<5||(0|(Dk=q[a+596>>2]))<1))for(Hk=(Bk=q[a+600>>2])+w(Dk,12)|0,Ik=q[a+44>>2],Dk=q[Ck+976>>2];;){if(Ck=(q[Bk>>2]<<2)+Ik|0,zk=x(q[Ck>>2]),1<=(0|(Ak=q[Bk+4>>2])))for(Jk=(a=q[Bk+8>>2])+w(Ak,48)|0;(Ak=q[a+8>>2])&&((Fk=Ak+-1|0)>>>0<=1?(Ak=q[a+4>>2],Gk=u[Dk+(Ak+q[a+12>>2]<<2)>>2],zk=x(Fk-1?zk+x(u[a+44>>2]*x(Gk*u[a+20>>2])):zk+x(u[a+44>>2]*x(x(Gk*u[a+20>>2])+x(u[Dk+(Ak+q[a+16>>2]<<2)>>2]*u[a+24>>2]))))):(q[Ek>>2]=Ak,Y(4,1024,Ek))),(a=a+48|0)>>>0>>0;);if(zk=(zk=x(zk+x(.0010000000474974513)))>2]=a,!((Bk=Bk+12|0)>>>0>>0))break}L=16+Ek|0}(a),function(a){var mj,nj,oj,pj,qj,rj,sj,tj,uj,ej=0,gj=0,ij=0,jj=0,kj=0,lj=x(0);if(L=mj=L-16|0,ej=q[a>>2],!(r[ej+4|0]<4||(va(a,q[a+604>>2],q[a+608>>2],q[ej+984>>2],q[a+152>>2],q[ej+796>>2]),gj=q[a>>2],r[gj+4|0]<5))){if(ij=q[a+608>>2],qj=q[gj+992>>2],rj=q[gj+988>>2],1<=(0|(ej=q[a+604>>2]))){for(sj=w(ej,12)+ij|0,tj=q[a+148>>2],nj=q[gj+980>>2];;){if(oj=(q[ij>>2]<<2)+tj|0,kj=q[oj>>2],1<=(0|(jj=q[ij+4>>2])))for(uj=(ej=q[ij+8>>2])+w(jj,48)|0;(jj=q[ej+8>>2])&&((pj=jj+-1|0)>>>0<=1?(jj=q[ej+4>>2],lj=u[(jj+q[ej+12>>2]<<2)+nj>>2],j(x(pj-1?x(u[ej+44>>2]*x(lj*u[ej+20>>2]))+(f(0,kj),k()):x(u[ej+44>>2]*x(x(lj*u[ej+20>>2])+x(u[(jj+q[ej+16>>2]<<2)+nj>>2]*u[ej+24>>2])))+(f(0,kj),k()))),kj=b[0]):(q[mj>>2]=jj,Y(4,1024,mj))),(ej=ej+48|0)>>>0>>0;);if(f(0,kj),lj=k(),u[oj>>2]=lj>>0>>0))break}ij=q[a+608>>2],ej=q[a+604>>2]}fa(ej,ij,rj,q[gj+1288>>2],q[gj+1292>>2],q[gj+1296>>2],q[a+156>>2]),fa(q[a+604>>2],q[a+608>>2],qj,q[gj+1300>>2],q[gj+1304>>2],q[gj+1308>>2],q[a+160>>2])}L=16+mj|0}(a),function(a){var Ai,ti=0,ui=0,vi=0,wi=0,xi=0,yi=x(0),zi=0,Bi=0,Ci=0,Di=0,Ei=0,Fi=0,Gi=0,Hi=0;if(L=Ai=L-80|0,xi=q[a>>2],!(r[xi+4|0]<5)){if(Fi=q[xi+1028>>2],Gi=q[xi+1024>>2],vi=ui=q[a+616>>2],!((0|(ti=q[a+612>>2]))<1)){for(Bi=w(ti,12)+ui|0,Ci=q[a+276>>2],zi=q[xi+1004>>2];;){if(Di=Ci+(q[ui>>2]<<2)|0,vi=q[Di>>2],1<=(0|(wi=q[ui+4>>2])))for(Hi=(ti=q[ui+8>>2])+w(wi,48)|0;(wi=q[ti+8>>2])&&((Ei=wi+-1|0)>>>0<=1?(wi=q[ti+4>>2],yi=u[zi+(wi+q[ti+12>>2]<<2)>>2],j(x(Ei-1?x(u[ti+44>>2]*x(yi*u[ti+20>>2]))+(f(0,vi),k()):x(u[ti+44>>2]*x(x(yi*u[ti+20>>2])+x(u[zi+(wi+q[ti+16>>2]<<2)>>2]*u[ti+24>>2])))+(f(0,vi),k()))),vi=b[0]):(q[64+Ai>>2]=wi,Y(4,1024,64+Ai|0))),(ti=ti+48|0)>>>0>>0;);if(q[Di>>2]=vi,!((ui=ui+12|0)>>>0>>0))break}if(vi=ui=q[a+616>>2],!((0|(ti=q[a+612>>2]))<1)){for(Bi=w(ti,12)+ui|0,Ci=q[a+280>>2],zi=q[q[a>>2]+1008>>2];;){if(Di=Ci+(q[ui>>2]<<2)|0,vi=q[Di>>2],1<=(0|(wi=q[ui+4>>2])))for(Hi=(ti=q[ui+8>>2])+w(wi,48)|0;(wi=q[ti+8>>2])&&((Ei=wi+-1|0)>>>0<=1?(wi=q[ti+4>>2],yi=u[zi+(wi+q[ti+12>>2]<<2)>>2],j(x(Ei-1?x(u[ti+44>>2]*x(yi*u[ti+20>>2]))+(f(0,vi),k()):x(u[ti+44>>2]*x(x(yi*u[ti+20>>2])+x(u[zi+(wi+q[ti+16>>2]<<2)>>2]*u[ti+24>>2])))+(f(0,vi),k()))),vi=b[0]):(q[48+Ai>>2]=wi,Y(4,1024,48+Ai|0))),(ti=ti+48|0)>>>0>>0;);if(q[Di>>2]=vi,!((ui=ui+12|0)>>>0>>0))break}if(vi=ui=q[a+616>>2],!((0|(ti=q[a+612>>2]))<1)){for(Bi=w(ti,12)+ui|0,Ci=q[a+268>>2],zi=q[q[a>>2]+996>>2];;){if(Di=Ci+(q[ui>>2]<<2)|0,vi=q[Di>>2],1<=(0|(wi=q[ui+4>>2])))for(Hi=(ti=q[ui+8>>2])+w(wi,48)|0;(wi=q[ti+8>>2])&&((Ei=wi+-1|0)>>>0<=1?(wi=q[ti+4>>2],yi=u[zi+(wi+q[ti+12>>2]<<2)>>2],j(x(Ei-1?x(u[ti+44>>2]*x(yi*u[ti+20>>2]))+(f(0,vi),k()):x(u[ti+44>>2]*x(x(yi*u[ti+20>>2])+x(u[zi+(wi+q[ti+16>>2]<<2)>>2]*u[ti+24>>2])))+(f(0,vi),k()))),vi=b[0]):(q[32+Ai>>2]=wi,Y(4,1024,32+Ai|0))),(ti=ti+48|0)>>>0>>0;);if(f(0,vi),yi=k(),u[Di>>2]=yi>>0>>0))break}ti=q[a+612>>2],vi=q[a+616>>2]}}}if(fa(ti,vi,Gi,q[xi+1288>>2],q[xi+1292>>2],q[xi+1296>>2],q[a+296>>2]),fa(q[a+612>>2],q[a+616>>2],Fi,q[xi+1300>>2],q[xi+1304>>2],q[xi+1308>>2],q[a+300>>2]),!((0|(ti=q[a+612>>2]))<1)){for(wi=(ui=q[a+616>>2])+w(ti,12)|0,Fi=q[a+284>>2],xi=q[q[a>>2]+1e3>>2];;){if(Gi=Fi+(q[ui>>2]<<2)|0,vi=q[Gi>>2],1<=(0|(zi=q[ui+4>>2])))for(Bi=(ti=q[ui+8>>2])+w(zi,48)|0;(zi=q[ti+8>>2])&&((Ci=zi+-1|0)>>>0<=1?(zi=q[ti+4>>2],yi=u[xi+(zi+q[ti+12>>2]<<2)>>2],j(x(Ci-1?x(u[ti+44>>2]*x(yi*u[ti+20>>2]))+(f(0,vi),k()):x(u[ti+44>>2]*x(x(yi*u[ti+20>>2])+x(u[xi+(zi+q[ti+16>>2]<<2)>>2]*u[ti+24>>2])))+(f(0,vi),k()))),vi=b[0]):(q[16+Ai>>2]=zi,Y(4,1024,16+Ai|0))),(ti=ti+48|0)>>>0>>0;);if(f(0,vi),yi=k(),u[Gi>>2]=yi>>0>>0))break}if(!((0|(ti=q[a+612>>2]))<1))for(zi=(ui=q[a+616>>2])+w(ti,12)|0,wi=q[a+272>>2],a=q[q[a>>2]+1012>>2];;){if(Fi=wi+(q[ui>>2]<<2)|0,vi=q[Fi>>2],1<=(0|(xi=q[ui+4>>2])))for(Gi=(ti=q[ui+8>>2])+w(xi,48)|0;(xi=q[ti+8>>2])&&((Bi=xi+-1|0)>>>0<=1?(xi=q[ti+4>>2],yi=u[a+(xi+q[ti+12>>2]<<2)>>2],j(x(Bi-1?x(u[ti+44>>2]*x(yi*u[ti+20>>2]))+(f(0,vi),k()):x(u[ti+44>>2]*x(x(yi*u[ti+20>>2])+x(u[a+(xi+q[ti+16>>2]<<2)>>2]*u[ti+24>>2])))+(f(0,vi),k()))),vi=b[0]):(q[Ai>>2]=xi,Y(4,1024,Ai))),(ti=ti+48|0)>>>0>>0;);if(f(0,vi),yi=k(),u[Fi>>2]=yi>>0>>0))break}}}L=80+Ai|0}(a),function(a){var $h,fi,gi,hi,ii,Vh=0,Wh=0,Xh=0,Yh=0,Zh=x(0),_h=0,ai=0,bi=0,ci=0,di=0,ei=0;x(0);if(L=$h=L-32|0,Xh=q[a>>2],!(r[Xh+4|0]<4||(va(a,q[a+620>>2],q[a+624>>2],q[Xh+1040>>2],q[a+444>>2],q[Xh+892>>2]),_h=q[a>>2],r[_h+4|0]<5))){if(hi=q[_h+1048>>2],ii=q[_h+1044>>2],Xh=Yh=q[a+624>>2],!((0|(Vh=q[a+620>>2]))<1)){for(di=w(Vh,12)+Yh|0,ei=q[a+440>>2],ai=q[_h+1036>>2];;){if(Xh=ei+(q[Yh>>2]<<2)|0,Zh=x(q[Xh>>2]),1<=(0|(Wh=q[Yh+4>>2])))for(bi=(Vh=q[Yh+8>>2])+w(Wh,48)|0;(Wh=q[Vh+8>>2])&&((ci=Wh+-1|0)>>>0<=1?(Wh=q[Vh+4>>2],fi=u[ai+(Wh+q[Vh+12>>2]<<2)>>2],Zh=x(ci-1?Zh+x(u[Vh+44>>2]*x(fi*u[Vh+20>>2])):Zh+x(u[Vh+44>>2]*x(x(fi*u[Vh+20>>2])+x(u[ai+(Wh+q[Vh+16>>2]<<2)>>2]*u[Vh+24>>2]))))):(q[16+$h>>2]=Wh,Y(4,1024,16+$h|0))),(Vh=Vh+48|0)>>>0>>0;);if(Zh=(Zh=x(Zh+x(.0010000000474974513)))>2]=Vh,!((Yh=Yh+12|0)>>>0>>0))break}if(Xh=Yh=q[a+624>>2],!((0|(Vh=q[a+620>>2]))<1)){for(di=w(Vh,12)+Yh|0,ei=q[a+448>>2],ai=q[q[a>>2]+1032>>2];;){if(bi=ei+(q[Yh>>2]<<2)|0,Xh=q[bi>>2],1<=(0|(Wh=q[Yh+4>>2])))for(ci=(Vh=q[Yh+8>>2])+w(Wh,48)|0;(Wh=q[Vh+8>>2])&&((gi=Wh+-1|0)>>>0<=1?(Wh=q[Vh+4>>2],Zh=u[ai+(Wh+q[Vh+12>>2]<<2)>>2],j(x(gi-1?x(u[Vh+44>>2]*x(Zh*u[Vh+20>>2]))+(f(0,Xh),k()):x(u[Vh+44>>2]*x(x(Zh*u[Vh+20>>2])+x(u[ai+(Wh+q[Vh+16>>2]<<2)>>2]*u[Vh+24>>2])))+(f(0,Xh),k()))),Xh=b[0]):(q[$h>>2]=Wh,Y(4,1024,$h))),(Vh=Vh+48|0)>>>0>>0;);if(f(0,Xh),Zh=k(),u[bi>>2]=Zh>>0>>0))break}Vh=q[a+620>>2],Xh=q[a+624>>2]}}fa(Vh,Xh,ii,q[_h+1288>>2],q[_h+1292>>2],q[_h+1296>>2],q[a+452>>2]),fa(q[a+620>>2],q[a+624>>2],hi,q[_h+1300>>2],q[_h+1304>>2],q[_h+1308>>2],q[a+456>>2])}L=32+$h|0}(a),function(a){var Pg,Qg,Rg,Sg,Tg,Ug,Kg=0,Lg=0,Mg=0,Ng=0,Og=x(0);if(L=Pg=L-16|0,Lg=q[a>>2],!(r[Lg+4|0]<5||(0|(Ng=q[a+628>>2]))<1))for(Sg=(Mg=q[a+632>>2])+w(Ng,12)|0,Tg=q[a+536>>2],Ng=q[Lg+1284>>2];;){if(Qg=(q[Mg>>2]<<2)+Tg|0,Lg=q[Qg>>2],1<=(0|(Kg=q[Mg+4>>2])))for(Ug=(a=q[Mg+8>>2])+w(Kg,48)|0;(Kg=q[a+8>>2])&&((Rg=Kg+-1|0)>>>0<=1?(Kg=q[a+4>>2],Og=u[Ng+(Kg+q[a+12>>2]<<2)>>2],j(x(Rg-1?x(u[a+44>>2]*x(Og*u[a+20>>2]))+(f(0,Lg),k()):x(u[a+44>>2]*x(x(Og*u[a+20>>2])+x(u[Ng+(Kg+q[a+16>>2]<<2)>>2]*u[a+24>>2])))+(f(0,Lg),k()))),Lg=b[0]):(q[Pg>>2]=Kg,Y(4,1024,Pg))),(a=a+48|0)>>>0>>0;);if(f(0,Lg),Og=k(),u[Qg>>2]=Og>>0>>0))break}L=16+Pg|0}(a),function(a){var Qh,Th,mh=0,Oh=0,Ph=0,Rh=x(0),Sh=0;if(1<=(0|(mh=q[a+4>>2])))for(Th=(Oh=q[a+8>>2])+w(mh,12)|0,mh=q[a+40>>2],Ph=q[a+52>>2],a=Qh=q[a+48>>2];q[mh>>2]&&(Rh=u[Ph>>2],u[a>>2]=Rh,-1!=(0|(Sh=q[Oh+4>>2])))&&(u[a>>2]=Rh*u[(Sh<<2)+Qh>>2]),a=a+4|0,Ph=Ph+4|0,mh=mh+4|0,(Oh=Oh+12|0)>>>0>>0;);}(a),function(a){var lh,ih=0,jh=0,kh=0;if(1<=(0|(lh=q[a+304>>2])))for(ih=q[a+308>>2],jh=q[a+312>>2];q[jh>>2]&&n[q[ih+20>>2]](a,kh),jh=jh+4|0,ih=ih+32|0,(0|lh)!=(0|(kh=kh+1|0)););}(a),function(a){var Zg,_g,ch,gh,hh,Xg=0,Yg=0,$g=(x(0),x(0),0),ah=0,bh=0,dh=(x(0),0),eh=0,fh=0;if(1<=(0|(Xg=q[a+332>>2])))for(eh=(Yg=q[a+336>>2])+w(Xg,20)|0,fh=q[a+308>>2],dh=q[a+316>>2],hh=q[a+48>>2],Xg=q[a+448>>2],$g=q[a+444>>2],bh=q[a+424>>2];q[bh>>2]&&(-1!=(0|(ah=q[Yg+4>>2]))&&(u[Xg>>2]=u[(ah<<2)+hh>>2]*u[Xg>>2]),-1!=(0|(ah=q[Yg+8>>2])))&&(u[Xg>>2]=u[dh+(ah<<2)>>2]*u[Xg>>2],gh=q[$g>>2],n[q[24+(fh+(ah<<5)|0)>>2]](a,ah,gh,gh,q[Yg+16>>2])),$g=$g+4|0,Xg=Xg+4|0,bh=bh+4|0,(Yg=Yg+20|0)>>>0>>0;);if(!(r[q[a>>2]+4|0]<4||(0|(Xg=q[a+332>>2]))<1))for(ah=($g=q[a+336>>2])+w(Xg,20)|0,eh=q[a+328>>2],fh=q[a+324>>2],Yg=q[a+452>>2],Xg=q[a+456>>2],bh=q[a+424>>2];q[bh>>2]&&-1!=(0|(a=q[$g+8>>2]))&&(a=(dh=a<<4)+fh|0,Zg=x(u[Yg>>2]*u[a>>2]),u[Yg>>2]=Zg,_g=x(u[Yg+4>>2]*u[a+4>>2]),u[Yg+4>>2]=_g,ch=u[a+8>>2],q[Yg+12>>2]=1065353216,u[Yg+4>>2]=_g>2]=Zg>2]),u[Yg+8>>2]=Zg>2],_g=u[(a=eh+dh|0)>>2],Zg=x(x(Zg+_g)-x(Zg*_g)),u[Xg>>2]=Zg,_g=u[Xg+4>>2],ch=u[a+4>>2],_g=x(x(_g+ch)-x(_g*ch)),u[Xg+4>>2]=_g,ch=u[a+8>>2],q[Xg+12>>2]=1065353216,u[Xg+4>>2]=_g>2]=Zg>2],Zg=x(x(ch+Zg)-x(Zg*ch)),u[Xg+8>>2]=Zg>>0>>0;);}(a),function(a){var Ln,Mn,On,Ko,Lo,Mo,No,Oo,Po,Qo,Ro,So,To,Uo,Vo,Wo,Xo,Yo,Zo,_o,Nn=0;x(0),x(0),x(0),x(0),x(0),x(0),x(0);if(1<=(0|(Oo=q[a+500>>2])))for(Zo=q[a+536>>2],Po=q[a+444>>2],_o=q[a+504>>2];;){if(a=w(Nn,24)+_o|0,0<(0|(Qo=q[a+12>>2])))for(On=u[(Nn<<2)+Zo>>2],Ro=q[a+20>>2],So=q[a+16>>2],To=q[(q[a+4>>2]<<2)+Po>>2],Uo=q[(q[a+8>>2]<<2)+Po>>2],a=0;Vo=u[((Ln=1|a)<<2)+So>>2],Mn=s[(a<<1)+Ro>>1]<<3&262136,Ko=u[(Wo=(4|Mn)+To|0)>>2],Ln=s[(Ln<<1)+Ro>>1]<<3&262136,Lo=u[(Xo=(4|Ln)+Uo|0)>>2],Mo=u[(Mn=Mn+To|0)>>2],Yo=u[(a<<2)+So>>2],No=u[(Ln=Ln+Uo|0)>>2],u[Mn>>2]=Mo+x(On*x(Yo*x(No-Mo))),u[Wo>>2]=Ko+x(On*x(Yo*x(Lo-Ko))),u[Ln>>2]=No+x(On*x(Vo*x(Mo-No))),u[Xo>>2]=Lo+x(On*x(Vo*x(Ko-Lo))),(0|(a=a+2|0))<(0|Qo););if(!((0|(Nn=Nn+1|0))<(0|Oo)))break}}(a),n[q[1810]](a),function(a){var Rc,Sc,Uc,Vc,Gc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Tc=0;if(!((0|(Rc=q[a+480>>2]))<1)){for(Kc=(Sc=q[a+484>>2])+w(Rc,28)|0,Nc=q[a+424>>2],Oc=q[a+40>>2],Lc=q[a+44>>2],Tc=q[a+440>>2],Gc=Sc;;){if(1<=(0|(Mc=q[Gc+4>>2])))for(Qc=Gc+20|0,Pc=q[Gc+12>>2],Ic=0;Uc=q[4+(Jc=Pc+(Ic<<4)|0)>>2]<<2,Jc=1==q[(Vc=Jc)>>2],q[Vc+12>>2]=q[(q[(Jc?Oc:Nc)+Uc>>2]?(Jc?Lc:Tc)+Uc|0:Qc)>>2],(0|(Ic=Ic+1|0))<(0|Mc););if(!((Gc=Gc+28|0)>>>0>>0))break}if(!((0|Rc)<1))for(Tc=q[a+436>>2],Oc=0;;){if(Kc=w(Oc,28)+Sc|0,!(q[(Nc=Kc)+24>>2]<1)){for(Jc=q[a+488>>2],Ic=0;q[Jc+(Ic<<2)>>2]=-1,(0|(Ic=Ic+1|0))<(0|(Gc=q[Nc+24>>2])););if(!((0|Gc)<1))for(Gc=q[a+496>>2],Ic=0;q[Gc+(Ic<<2)>>2]=-1,(0|(Ic=Ic+1|0))>2];);}if(!(q[Kc+4>>2]<1)){for(Lc=q[a+492>>2],Ic=0;q[Lc+(Ic<<2)>>2]=-1,(0|(Ic=Ic+1|0))<(0|(Gc=q[Kc+4>>2])););if(!((0|Gc)<1))for(Mc=q[Kc+12>>2],Qc=q[a+496>>2],Ic=0;Pc=q[12+(Mc+(Ic<<4)|0)>>2]-q[Kc+20>>2]<<2,Gc=-1==(0|(Gc=q[(Jc=Pc+Qc|0)>>2]))?Pc+q[a+488>>2]|0:Lc+(Gc<<2)|0,q[Gc>>2]=Ic,(0|(Ic=(q[Jc>>2]=Ic)+1|0))>2];);}if(1<=(0|(Gc=q[Nc+24>>2])))for(Lc=q[Kc+8>>2],Qc=q[a+488>>2],Mc=0;;){if(-1!=(0|(Ic=q[Qc+(Mc<<2)>>2]))){for(Pc=q[a+492>>2],Jc=q[Kc+12>>2];Lc=(Gc=1==q[(Gc=Jc+(Ic<<4)|0)>>2]?(Gc=w(q[Gc+8>>2],28)+Sc|0,q[Gc+8>>2]=Lc,q[Gc>>2]):(q[Tc+(q[Gc+4>>2]<<2)>>2]=Lc,1))+Lc|0,(0|Ic)<(0|(Gc=q[Pc+(Ic<<2)>>2]))&&-1!=(0|(Ic=Gc)););Gc=q[Nc+24>>2]}if(!((0|(Mc=Mc+1|0))<(0|Gc)))break}if((0|Rc)==(0|(Oc=Oc+1|0)))break}}}(a),function(a){var Bg=0,Cg=0,Dg=0,Eg=0,Gg=0,Hg=x(0),Ig=0,Jg=0,Fg=q[a+332>>2];if(q[a+644>>2]){if(!(((q[a+428>>2]=0)|Fg)<1))for(;Bg=126,Ig=q[a+432>>2]+Dg|0,!q[(Cg=Dg<<2)+q[a+424>>2]>>2]|u[Cg+q[a+448>>2]>>2]==x(0)||(Bg=127),o[0|Ig]=Bg,(0|Fg)!=(0|(Dg=Dg+1|0)););}else if(q[a+428>>2]){if(Bg=r[q[a>>2]+4|0],!(((q[a+428>>2]=0)|Fg)<1))if(4<=Bg>>>0)for(;Hg=u[(Bg=Dg<<2)+q[a+448>>2]>>2],Eg=q[Bg+q[a+424>>2]>>2],Cg=Hg!=x(0)&0!=(0|Eg),Ig=q[a+432>>2]+Dg|0,Cg=(0|Cg)==(1&o[0|Ig])?Cg:2|Cg,Cg=Hg!=u[Bg+q[a+468>>2]>>2]?4|Cg:Cg,Cg=q[Bg+q[a+440>>2]>>2]==q[Bg+q[a+464>>2]>>2]?Cg:8|Cg,Bg=q[Bg+q[a+436>>2]>>2]==q[Bg+q[a+460>>2]>>2]?Cg:16|Cg,Bg=Eg?32|Bg:Bg,Eg=(Cg=Jg<<2)+q[a+452>>2]|0,Gg=Cg+q[a+472>>2]|0,(u[Eg>>2]!=u[Gg>>2]|u[Eg+4>>2]!=u[Gg+4>>2]|(u[Eg+8>>2]!=u[Gg+8>>2]|u[Eg+12>>2]!=u[Gg+12>>2])||(Eg=Cg+q[a+456>>2]|0,Cg=Cg+q[a+476>>2]|0,u[Eg>>2]!=u[Cg>>2]|u[Eg+4>>2]!=u[Cg+4>>2]|u[Eg+8>>2]!=u[Cg+8>>2])||u[Eg+12>>2]!=u[Cg+12>>2])&&(Bg|=64),o[0|Ig]=Bg,Jg=Jg+4|0,(0|Fg)!=(0|(Dg=Dg+1|0)););else for(;Hg=u[(Bg=Dg<<2)+q[a+448>>2]>>2],Eg=q[Bg+q[a+424>>2]>>2],Cg=Hg!=x(0)&0!=(0|Eg),Gg=q[a+432>>2]+Dg|0,Cg=(0|Cg)==(1&o[0|Gg])?Cg:2|Cg,Cg=Hg!=u[Bg+q[a+468>>2]>>2]?4|Cg:Cg,Cg=q[Bg+q[a+440>>2]>>2]==q[Bg+q[a+464>>2]>>2]?Cg:8|Cg,Bg=q[Bg+q[a+436>>2]>>2]==q[Bg+q[a+460>>2]>>2]?Cg:16|Cg,o[0|Gg]=Eg?32|Bg:Bg,(0|Fg)!=(0|(Dg=Dg+1|0)););}else if(!((0|Fg)<1))for(;!q[(Bg=Dg<<2)+q[a+424>>2]>>2]|u[Bg+q[a+448>>2]>>2]==x(0)?(Bg=q[a+432>>2]+Dg|0,o[0|Bg]=254&r[0|Bg]):(Bg=q[a+432>>2]+Dg|0,o[0|Bg]=1|r[0|Bg]),(0|Fg)!=(0|(Dg=Dg+1|0)););}(a),q[a+644>>2]=0}function va(a,Wa,Xa,Ya,Za,_a){var fb,gb,hb,jb,kb,cb,db,ab=0,bb=0,eb=0,ib=0;if(L=cb=L-32|0,1<=(0|Wa))for(kb=w(Wa,12)+Xa|0;;){if(!((0|(ab=q[Xa+4>>2]))<1))if(fb=(Wa=q[Xa+8>>2])+w(ab,48)|0,ab=q[Xa>>2]<<2,1<=(0|(db=q[ab+_a>>2])))for(db<<=1,gb=q[q[a>>2]+1052>>2],hb=q[Za+ab>>2];;){b:if(ab=q[Wa+8>>2]){c:{if((bb=ab+-1|0)>>>0<=1){if(ab=(q[Wa+4>>2]<<2)+Ya|0,ib=(q[ab+(q[Wa+12>>2]<<2)>>2]<<2)+gb|0,bb-1)break c;for(eb=(q[ab+(q[Wa+16>>2]<<2)>>2]<<2)+gb|0,ab=0;u[(jb=(bb=ab<<2)+hb|0)>>2]=u[jb>>2]+x(u[Wa+44>>2]*x(x(u[bb+ib>>2]*u[Wa+20>>2])+x(u[bb+eb>>2]*u[Wa+24>>2]))),(0|db)!=(0|(ab=ab+1|0)););break b}q[cb>>2]=ab,Y(4,1024,cb);break b}for(ab=0;u[(eb=(bb=ab<<2)+hb|0)>>2]=u[eb>>2]+x(u[Wa+44>>2]*x(u[bb+ib>>2]*u[Wa+20>>2])),(0|db)!=(0|(ab=ab+1|0)););}if(!((Wa=Wa+48|0)>>>0>>0))break}else for(;3<=(ab=q[Wa+8>>2])>>>0&&(q[16+cb>>2]=ab,Y(4,1024,16+cb|0)),(Wa=Wa+48|0)>>>0>>0;);if(!((Xa=Xa+12|0)>>>0>>0))break}L=32+cb|0}function wa(a,Wa,Xa){var Ya;Wa|=0,Xa|=0,L=Ya=L+-64|0;a:{if(a|=0)if(Wa)if((Wa+15&-16)!=(0|Wa))q[52+Ya>>2]=1522,q[48+Ya>>2]=2361,Y(4,1294,48+Ya|0);else{if(Wa=function(a,Il,Jl){var jm,$l=0,hm=0,im=0,km=0,lm=0,mm=0,nm=0,om=0,pm=0,qm=0,rm=0,sm=0,tm=0,um=x(0),vm=0,wm=0,xm=0,ym=0,zm=0;if(ca(16+(L=jm=L-576|0)|0,0,560),Fa(a,16+jm|0,12+jm|0),(km=q[12+jm>>2])>>>0<=Jl>>>0){if($l=(hm=ca(Il,0,km))+q[16+jm>>2]|0,q[$l+8>>2]=hm+q[20+jm>>2],q[$l+40>>2]=hm+q[24+jm>>2],q[$l+44>>2]=hm+q[28+jm>>2],q[$l+48>>2]=hm+q[32+jm>>2],q[$l+52>>2]=hm+q[36+jm>>2],q[$l+16>>2]=hm+q[40+jm>>2],q[$l+24>>2]=hm+q[44+jm>>2],q[$l+28>>2]=hm+q[48+jm>>2],q[$l+32>>2]=hm+q[52+jm>>2],q[$l+36>>2]=hm+q[56+jm>>2],Il=q[a+704>>2],q[$l+308>>2]=hm+q[60+jm>>2],q[$l+312>>2]=hm+q[64+jm>>2],q[$l+316>>2]=hm+q[68+jm>>2],q[$l+320>>2]=hm+q[72+jm>>2],q[$l+324>>2]=hm+q[76+jm>>2],q[$l+328>>2]=hm+q[80+jm>>2],q[$l+60>>2]=hm+q[84+jm>>2],q[$l+144>>2]=hm+q[88+jm>>2],q[$l+148>>2]=hm+q[92+jm>>2],Jl=hm+q[96+jm>>2]|0,q[$l+152>>2]=Jl,!((0|(km=q[Il+8>>2]))<1)&&(Il=hm+q[100+jm>>2]|0,q[Jl>>2]=Il,1!=(0|km)))for(Jl=1;Il=(15+(q[q[a+796>>2]+(im<<2)>>2]<<3)&-16)+Il|0,q[q[$l+152>>2]+(Jl<<2)>>2]=Il,(0|km)!=(0|(Jl=(im=Jl)+1|0)););if(q[$l+156>>2]=hm+q[104+jm>>2],q[$l+160>>2]=hm+q[108+jm>>2],q[$l+68>>2]=hm+q[112+jm>>2],q[$l+76>>2]=hm+q[116+jm>>2],q[$l+80>>2]=hm+q[120+jm>>2],q[$l+84>>2]=hm+q[124+jm>>2],q[$l+88>>2]=hm+q[128+jm>>2],q[$l+92>>2]=hm+q[132+jm>>2],q[$l+96>>2]=hm+q[136+jm>>2],q[$l+100>>2]=hm+q[140+jm>>2],q[$l+104>>2]=hm+q[144+jm>>2],q[$l+108>>2]=hm+q[148+jm>>2],q[$l+112>>2]=hm+q[152+jm>>2],q[$l+116>>2]=hm+q[156+jm>>2],q[$l+120>>2]=hm+q[160+jm>>2],q[$l+124>>2]=hm+q[164+jm>>2],q[$l+128>>2]=hm+q[168+jm>>2],q[$l+132>>2]=hm+q[172+jm>>2],q[$l+136>>2]=hm+q[176+jm>>2],q[$l+140>>2]=hm+q[180+jm>>2],q[$l+168>>2]=hm+q[184+jm>>2],q[$l+264>>2]=hm+q[188+jm>>2],q[$l+268>>2]=hm+q[192+jm>>2],q[$l+272>>2]=hm+q[196+jm>>2],q[$l+276>>2]=hm+q[200+jm>>2],q[$l+280>>2]=hm+q[204+jm>>2],q[$l+284>>2]=hm+q[208+jm>>2],q[$l+288>>2]=hm+q[212+jm>>2],q[$l+292>>2]=hm+q[216+jm>>2],q[$l+296>>2]=hm+q[220+jm>>2],q[$l+300>>2]=hm+q[224+jm>>2],q[$l+176>>2]=hm+q[228+jm>>2],q[$l+184>>2]=hm+q[232+jm>>2],q[$l+188>>2]=hm+q[236+jm>>2],q[$l+192>>2]=hm+q[240+jm>>2],q[$l+196>>2]=hm+q[244+jm>>2],q[$l+200>>2]=hm+q[248+jm>>2],q[$l+204>>2]=hm+q[252+jm>>2],q[$l+208>>2]=hm+q[256+jm>>2],q[$l+212>>2]=hm+q[260+jm>>2],q[$l+216>>2]=hm+q[264+jm>>2],q[$l+220>>2]=hm+q[268+jm>>2],q[$l+224>>2]=hm+q[272+jm>>2],q[$l+228>>2]=hm+q[276+jm>>2],q[$l+232>>2]=hm+q[280+jm>>2],q[$l+236>>2]=hm+q[284+jm>>2],q[$l+240>>2]=hm+q[288+jm>>2],q[$l+244>>2]=hm+q[292+jm>>2],q[$l+248>>2]=hm+q[296+jm>>2],q[$l+252>>2]=hm+q[300+jm>>2],q[$l+256>>2]=hm+q[304+jm>>2],q[$l+260>>2]=hm+q[308+jm>>2],Il=q[a+704>>2],q[$l+336>>2]=hm+q[312+jm>>2],q[$l+424>>2]=hm+q[316+jm>>2],q[$l+432>>2]=hm+q[320+jm>>2],q[$l+436>>2]=hm+q[324+jm>>2],q[$l+440>>2]=hm+q[328+jm>>2],Jl=hm+q[332+jm>>2]|0,q[$l+444>>2]=Jl,!((0|(km=q[Il+16>>2]))<1)&&(im=hm+q[336+jm>>2]|0,q[Jl>>2]=im,(Jl=1)!=(0|km)))for(Il=0;im=(15+(q[q[a+892>>2]+(Il<<2)>>2]<<3)&-16)+im|0,q[q[$l+444>>2]+(Jl<<2)>>2]=im,(0|km)!=(0|(Jl=(Il=Jl)+1|0)););if(q[$l+448>>2]=hm+q[340+jm>>2],q[$l+452>>2]=hm+q[344+jm>>2],q[$l+456>>2]=hm+q[348+jm>>2],q[$l+460>>2]=hm+q[352+jm>>2],q[$l+464>>2]=hm+q[356+jm>>2],q[$l+468>>2]=hm+q[360+jm>>2],q[$l+472>>2]=hm+q[364+jm>>2],q[$l+476>>2]=hm+q[368+jm>>2],q[$l+344>>2]=hm+q[372+jm>>2],q[$l+352>>2]=hm+q[376+jm>>2],q[$l+356>>2]=hm+q[380+jm>>2],q[$l+360>>2]=hm+q[384+jm>>2],q[$l+364>>2]=hm+q[388+jm>>2],q[$l+368>>2]=hm+q[392+jm>>2],q[$l+372>>2]=hm+q[396+jm>>2],q[$l+376>>2]=hm+q[400+jm>>2],q[$l+380>>2]=hm+q[404+jm>>2],q[$l+384>>2]=hm+q[408+jm>>2],q[$l+388>>2]=hm+q[412+jm>>2],q[$l+392>>2]=hm+q[416+jm>>2],q[$l+396>>2]=hm+q[420+jm>>2],q[$l+400>>2]=hm+q[424+jm>>2],q[$l+404>>2]=hm+q[428+jm>>2],q[$l+408>>2]=hm+q[432+jm>>2],q[$l+412>>2]=hm+q[436+jm>>2],q[$l+416>>2]=hm+q[440+jm>>2],q[$l+420>>2]=hm+q[444+jm>>2],Il=q[448+jm>>2],Jl=q[452+jm>>2],q[$l+552>>2]=hm+q[456+jm>>2],q[$l+548>>2]=Jl+hm,q[$l+544>>2]=Il+hm,q[$l+560>>2]=hm+q[460+jm>>2],Il=q[a+704>>2],nm=hm+q[464+jm>>2]|0,q[$l+568>>2]=nm,1<=(0|(mm=q[Il+48>>2])))for(im=hm+q[468+jm>>2]|0,Il=hm+q[472+jm>>2]|0,lm=hm+q[476+jm>>2]|0,om=q[a+1072>>2],Jl=0;km=nm+w(Jl,36)|0,q[km+20>>2]=lm,q[km+16>>2]=Il,q[km>>2]=im,im=((km=q[om+(Jl<<2)>>2])<<2)+im|0,lm=(km=1<>2],km=hm+q[516+jm>>2]|0,q[$l+484>>2]=km,1<=(0|(Il=q[Il+72>>2])))for(im=hm+q[520+jm>>2]|0,lm=q[a+1212>>2],Jl=0;q[12+(km+w(Jl,28)|0)>>2]=im,im=(q[lm+(Jl<<2)>>2]<<4)+im|0,(0|Il)!=(0|(Jl=Jl+1|0)););q[$l+488>>2]=hm+q[524+jm>>2],q[$l+492>>2]=hm+q[528+jm>>2],q[$l+496>>2]=hm+q[532+jm>>2],q[$l+504>>2]=hm+q[536+jm>>2],q[$l+536>>2]=hm+q[540+jm>>2],q[$l+512>>2]=hm+q[544+jm>>2],q[$l+520>>2]=hm+q[548+jm>>2],q[$l+524>>2]=hm+q[552+jm>>2],q[$l+528>>2]=hm+q[556+jm>>2],q[$l+532>>2]=hm+q[560+jm>>2];c:{if(4<=(mm=r[a+4|0])>>>0){if(q[$l+576>>2]=hm+q[480+jm>>2],q[$l+584>>2]=hm+q[484+jm>>2],Il=q[a+704>>2],Jl=q[492+jm>>2],km=hm+q[488+jm>>2]|0,q[$l+592>>2]=km,1<=(0|(Il=q[Il+104>>2])))for(im=Jl+hm|0,lm=q[a+1104>>2],Jl=0;q[40+(km+w(Jl,48)|0)>>2]=im,im=(q[lm+(Jl<<2)>>2]<<2)+im|0,(0|Il)!=(0|(Jl=Jl+1|0)););q[$l+608>>2]=hm+q[500+jm>>2],q[$l+624>>2]=hm+q[508+jm>>2]}else{if(Il=q[572+jm>>2],Jl=q[568+jm>>2],q[$l+636>>2]=hm+q[564+jm>>2],q[$l+640>>2]=Jl+hm,q[q[a+704>>2]+20>>2]<1)break c;for(km=Il+hm|0,nm=0;;){e:{if((0|(im=q[(Il=nm<<2)+q[a+952>>2]>>2]))<=0)Il=Il+q[$l+636>>2]|0;else{for(lm=im+(Jl=q[Il+q[a+948>>2]>>2])|0,om=q[a+1060>>2],im=0;im=q[om+(Jl<<2)>>2]+im|0,(0|(Jl=Jl+1|0))<(0|lm););if(Il=Il+q[$l+636>>2]|0,Jl=km,im)break e}Jl=im=0}if(q[Il>>2]=Jl,km=(im<<2)+km|0,!((0|(nm=nm+1|0))>2]+20>>2]))break}}mm>>>0<5||(q[$l+600>>2]=hm+q[496+jm>>2],q[$l+616>>2]=hm+q[504+jm>>2],q[$l+632>>2]=hm+q[512+jm>>2])}q[$l+644>>2]=1,q[$l>>2]=a,q[$l+648>>2]=1&o[q[a+708>>2]+20|0],hm=q[a+704>>2],nm=q[hm+20>>2];g:if(!((0|(q[$l+540>>2]=nm))<1)){if(Il=nm+-1|0,om=q[a+952>>2],pm=q[a+940>>2],qm=q[a+932>>2],rm=q[a+936>>2],sm=q[a+924>>2],tm=q[a+928>>2],vm=q[$l+552>>2],xm=q[$l+544>>2],mm>>>0<4)for(;;)if(Jl=xm+w(Il,52)|0,im=(km=Il<<2)+tm|(q[Jl>>2]=0),q[Jl+4>>2]=q[im>>2],q[Jl+8>>2]=q[(lm=km+sm|0)>>2],u[Jl+12>>2]=u[lm>>2]-u[im>>2],q[Jl+16>>2]=q[km+rm>>2],q[Jl+44>>2]=q[(im=km+qm|0)>>2],um=Aa(x(q[km+pm>>2])),u[Jl+20>>2]=um,u[Jl+24>>2]=um*x(1.5),wm=q[km+om>>2],lm=0,lm=(q[Jl+32>>2]=wm)?q[$l+560>>2]+w(q[km+q[a+948>>2]>>2],28)|0:lm,q[Jl+48>>2]=1,q[Jl+28>>2]=lm,q[km+vm>>2]=q[im>>2],Jl=0<(0|Il),Il=Il+-1|0,!Jl)break g;for(wm=q[a+960>>2],zm=q[a+944>>2];Jl=xm+w(Il,52)|0,q[Jl>>2]=q[(im=Il<<2)+zm>>2],q[Jl+4>>2]=q[(km=im+tm|0)>>2],q[Jl+8>>2]=q[(lm=im+sm|0)>>2],u[Jl+12>>2]=u[lm>>2]-u[km>>2],q[Jl+16>>2]=q[im+rm>>2],q[Jl+44>>2]=q[(ym=im+qm|0)>>2],um=Aa(x(q[im+pm>>2])),u[Jl+20>>2]=um,u[Jl+24>>2]=um*x(1.5),lm=q[im+om>>2],q[Jl+32>>2]=lm,q[Jl+28>>2]=lm?q[$l+560>>2]+w(q[im+q[a+948>>2]>>2],28)|0:0,km=q[im+wm>>2],km=(q[Jl+40>>2]=km)?q[$l+584>>2]+w(q[im+q[a+956>>2]>>2],28)|0:0,q[Jl+48>>2]=1,q[Jl+36>>2]=km,q[im+vm>>2]=q[ym>>2],Jl=0<(0|Il),Il=Il+-1|0,Jl;);}if(4<=mm>>>0?(q[$l+548>>2]=q[a+944>>2],km=a):(ca(q[$l+548>>2],0,nm<<2),km=q[$l>>2],hm=q[km+704>>2]),im=q[hm+52>>2],1<=(0|(q[$l+556>>2]=im)))for(Jl=q[km+1056>>2],lm=q[km+1192>>2],nm=q[km+1060>>2],mm=q[$l+560>>2];Il=mm+w(im=im+-1|0,28)|0,q[Il>>2]=q[(om=im<<2)+nm>>2],om=q[Jl+om>>2],q[Il+24>>2]=1,q[Il+16>>2]=0,q[Il+20>>2]=1,q[Il+8>>2]=0,q[Il+12>>2]=0,q[Il+4>>2]=lm+(om<<2),0<(0|im););if(im=q[hm+48>>2],1<=(0|(q[$l+564>>2]=im))){for(;;){if(Il=q[$l+568>>2]+w(im=im+-1|0,36)|0,lm=q[(hm=im<<2)+q[km+1072>>2]>>2],1<=(0|(q[Il+4>>2]=lm)))for(Jl=0;q[q[Il>>2]+(Jl<<2)>>2]=q[$l+560>>2]+w(q[q[km+1064>>2]+(q[hm+q[km+1068>>2]>>2]+Jl<<2)>>2],28),(0|lm)!=(0|(Jl=Jl+1|0)););if(q[Il+24>>2]=1,q[Il+28>>2]=1,q[Il+8>>2]=1<>2],hm=q[km+704>>2]}if(Il=q[hm>>2],(0|(q[$l+4>>2]=Il))<1)Jl=0;else{for(om=q[km+732>>2],pm=q[km+736>>2],qm=q[km+740>>2],lm=q[km+720>>2],rm=q[$l+52>>2],nm=q[$l+568>>2],sm=q[$l+8>>2],im=Il;mm=sm+w(im=im+-1|0,12)|0,q[mm>>2]=nm+w(q[(Jl=im<<2)+lm>>2],36),q[mm+4>>2]=q[Jl+qm>>2],q[mm+8>>2]=q[Jl+pm>>2],u[Jl+rm>>2]=q[Jl+om>>2]?x(1):x(0),0<(0|im););for(mm=q[$l+16>>2],Jl=0;im=q[8+(nm+w(q[(om=(Il=Il+-1|0)<<2)+lm>>2],36)|0)>>2],Jl=Jl+(q[mm+om>>2]=im)|0,0<(0|Il););Il=q[$l+4>>2]}if(q[$l+12>>2]=Il,q[$l+20>>2]=Jl,Il=q[hm+4>>2],1<=(0|(q[$l+304>>2]=Il))){for(;Jl=q[$l+308>>2]+((Il=Il+-1|0)<<5)|0,q[Jl>>2]=q[$l+568>>2]+w(q[(im=Il<<2)+q[km+752>>2]>>2],36),q[Jl+4>>2]=q[im+q[km+764>>2]>>2],q[Jl+8>>2]=q[im+q[km+768>>2]>>2],lm=q[im+q[km+772>>2]>>2],q[Jl+12>>2]=lm,hm=q[im+q[km+776>>2]>>2],q[Jl+16>>2]=hm,q[Jl+28>>2]=q[im+q[km+760>>2]>>2],lm>>>0<=1?lm-1?(q[20+(q[$l+60>>2]+w(hm,24)|0)>>2]=Il,q[Jl+24>>2]=1,q[Jl+20>>2]=2):(q[8+(q[$l+168>>2]+w(hm,12)|0)>>2]=Il,q[Jl+24>>2]=3,q[Jl+20>>2]=4):Y(4,1179,0),0<(0|Il););km=q[$l>>2],hm=q[km+704>>2]}im=q[hm+8>>2];k:if(!((0|(q[$l+56>>2]=im))<1)){if(Jl=im+-1|0,nm=q[km+796>>2],mm=q[km+804>>2],om=q[km+800>>2],pm=q[km+780>>2],qm=q[$l+568>>2],rm=q[$l+60>>2],r[km+4|0]<2)for(;;)if(Il=rm+w(Jl,24)|0,q[Il>>2]=qm+w(q[(lm=Jl<<2)+pm>>2],36),q[Il+4>>2]=q[lm+om>>2],q[Il+8>>2]=q[lm+mm>>2],lm=q[lm+nm>>2],q[Il+12>>2]=0,q[Il+16>>2]=lm,Il=0<(0|Jl),Jl=Jl+-1|0,!Il)break k;for(sm=q[km+808>>2];Il=rm+w(Jl,24)|0,q[Il>>2]=qm+w(q[(lm=Jl<<2)+pm>>2],36),q[Il+4>>2]=q[lm+om>>2],q[Il+8>>2]=q[lm+mm>>2],q[Il+16>>2]=q[lm+nm>>2],q[Il+12>>2]=q[lm+sm>>2],Il=0<(0|Jl),Jl=Jl+-1|0,Il;);}if(Jl=q[hm+12>>2],1<=(0|(q[$l+164>>2]=Jl)))for(lm=q[km+828>>2],nm=q[km+812>>2],mm=q[$l+568>>2],om=q[$l+168>>2],Il=Jl;pm=om+w(Il=Il+-1|0,12)|0,q[pm>>2]=mm+w(q[(qm=Il<<2)+nm>>2],36),q[pm+4>>2]=q[lm+qm>>2],0<(0|Il););if(((Il=0)|im)<1)lm=0;else{for(nm=q[$l+68>>2],mm=q[$l+60>>2],lm=0;Jl=q[q[mm+w(im=im+-1|0,24)>>2]+8>>2],lm=(q[nm+(im<<2)>>2]=Jl)+lm|0,0<(0|im););Jl=q[$l+164>>2],im=q[$l+56>>2]}if(q[$l+64>>2]=im,q[$l+72>>2]=lm,im=$l,1<=(0|Jl)){for(nm=q[$l+176>>2],mm=q[$l+168>>2];lm=q[q[mm+w(Jl=Jl+-1|0,12)>>2]+8>>2],Il=Il+(q[nm+(Jl<<2)>>2]=lm)|0,0<(0|Jl););Jl=q[$l+164>>2]}if(q[im+172>>2]=Jl,q[$l+180>>2]=Il,lm=q[hm+16>>2],1<=(0|(q[$l+332>>2]=lm))){for(om=q[km+872>>2],pm=q[km+892>>2],qm=q[km+880>>2],rm=q[km+876>>2],nm=q[km+852>>2],mm=q[$l+568>>2],sm=q[$l+336>>2],Il=lm;Jl=sm+w(Il=Il+-1|0,20)|0,q[Jl>>2]=mm+w(q[(im=Il<<2)+nm>>2],36),q[Jl+4>>2]=q[im+rm>>2],q[Jl+8>>2]=q[im+qm>>2],q[Jl+16>>2]=q[im+pm>>2],q[Jl+12>>2]=q[im+om>>2],0<(0|Il););for(im=q[$l+344>>2],Jl=0;Il=q[8+(mm+w(q[(om=(lm=lm+-1|0)<<2)+nm>>2],36)|0)>>2],Jl=(q[im+om>>2]=Il)+Jl|0,0<(0|lm););if(q[$l+348>>2]=Jl,lm=q[$l+332>>2],!((0|(q[$l+340>>2]=lm))<1))for(Jl=lm<<2,im=q[$l+456>>2],nm=q[$l+452>>2];q[(mm=(Il=Jl+-4|0)<<2)+nm>>2]=1065353216,q[(om=(Jl<<=2)-4|0)+nm>>2]=1065353216,q[(pm=(Jl=Jl+-12|0)+nm|0)>>2]=1065353216,q[pm+4>>2]=1065353216,q[im+mm>>2]=0,q[im+om>>2]=1065353216,q[(Jl=Jl+im|0)>>2]=0,q[Jl+4>>2]=0,Jl=Il,0<(0|(lm=lm+-1|0)););}else q[$l+340>>2]=lm,q[$l+348>>2]=0;if(lm=q[hm+72>>2],1<=(0|(q[$l+480>>2]=lm)))for(om=q[km+1208>>2],pm=q[km+1224>>2],qm=q[km+1220>>2],rm=q[km+1216>>2],sm=q[km+1212>>2],tm=q[$l+484>>2],im=0;;){if(Il=tm+w(im,28)|0,nm=q[(Jl=im<<2)+sm>>2],q[Il+4>>2]=nm,q[Il>>2]=q[Jl+rm>>2],mm=q[Jl+qm>>2],q[Il+16>>2]=mm,vm=q[Jl+pm>>2],q[Il+20>>2]=vm,q[Il+8>>2]=0,q[Il+24>>2]=1+(mm-vm|0),1<=(0|nm))for(vm=q[Jl+om>>2],xm=q[Il+12>>2],wm=q[km+1236>>2],zm=q[km+1228>>2],ym=q[km+1232>>2],Jl=0;q[4+(Il=xm+(Jl<<4)|0)>>2]=q[(mm=Jl+vm<<2)+ym>>2],q[Il>>2]=q[mm+zm>>2],mm=q[mm+wm>>2],q[Il+12>>2]=0,q[Il+8>>2]=mm,(0|nm)!=(0|(Jl=Jl+1|0)););if((0|lm)==(0|(im=im+1|0)))break}if(Jl=q[hm+80>>2],(0|(q[$l+500>>2]=Jl))<1)im=0;else{for(mm=q[km+1280>>2],om=q[km+1268>>2],pm=q[km+1276>>2],qm=q[km+1272>>2],rm=q[km+1264>>2],sm=q[km+1260>>2],lm=q[km+1248>>2],nm=q[$l+568>>2],tm=q[$l+504>>2];Il=tm+w(Jl=Jl+-1|0,24)|0,q[Il>>2]=nm+w(q[(im=Jl<<2)+lm>>2],36),q[Il+4>>2]=q[im+sm>>2],q[Il+8>>2]=q[im+rm>>2],q[Il+12>>2]=q[im+qm>>2],im=q[im+om>>2],q[Il+20>>2]=mm+(im<<1),q[Il+16>>2]=pm+(im<<2),0<(0|Jl););if((0|(Jl=q[$l+500>>2]))<1)im=0;else{for(mm=q[$l+512>>2],im=0;Il=q[8+(nm+w(q[(om=(Jl=Jl+-1|0)<<2)+lm>>2],36)|0)>>2],im=(q[mm+om>>2]=Il)+im|0,0<(0|Jl););Jl=q[$l+500>>2]}}q[$l+508>>2]=Jl,q[$l+516>>2]=im;o:if(4<=r[a+4|0]){if(!((lm=r[km+4|0])>>>0<4)){if(Jl=q[hm+120>>2],1<=(0|(q[$l+572>>2]=Jl))){for(mm=q[km+1172>>2],om=q[$l+576>>2];lm=(0|(hm=q[(Il=(Jl=Jl+-1|0)<<2)+mm>>2]))<0?hm=nm=im=0:(im=(lm=q[Il+q[km+1176>>2]>>2]<<2)+q[km+1188>>2]|0,nm=q[Il+q[km+1180>>2]>>2],hm=q[$l+544>>2]+w(hm,52)|0,lm+q[km+1184>>2]|0),Il=om+w(Jl,20)|0,q[Il+12>>2]=nm,q[Il+8>>2]=im,q[Il+4>>2]=lm,q[Il>>2]=hm,0<(0|Jl););if(km=q[$l>>2],(lm=r[km+4|0])>>>0<4)break o}if(hm=q[km+704>>2],im=q[hm+100>>2],1<=(0|(q[$l+580>>2]=im)))for(nm=q[km+1084>>2],mm=q[km+1076>>2],om=q[km+1192>>2],pm=q[km+1080>>2],qm=q[$l+584>>2];Il=qm+w(im=im+-1|0,28)|0,q[Il>>2]=q[(Jl=im<<2)+pm>>2],q[Il+4>>2]=om+(q[Jl+mm>>2]<<2),Jl=q[Jl+nm>>2],q[Il+20>>2]=1,q[Il+24>>2]=1,q[Il+12>>2]=0,q[Il+16>>2]=0,q[Il+8>>2]=Jl,0<(0|im););if(im=q[hm+104>>2],1<=(0|(q[$l+588>>2]=im))){for(;;){if(Il=q[$l+592>>2]+w(im=im+-1|0,48)|0,q[Il>>2]=q[$l+584>>2]+w(q[(lm=im<<2)+q[km+1088>>2]>>2],28),Jl=q[lm+q[km+1092>>2]>>2],q[Il+28>>2]=1,q[Il+32>>2]=1,q[Il+8>>2]=0,q[Il+4>>2]=Jl,hm=q[lm+q[km+1104>>2]>>2],1<=(0|(q[Il+36>>2]=hm)))for(Jl=0;q[q[Il+40>>2]+(Jl<<2)>>2]=q[$l+576>>2]+w(q[q[km+1168>>2]+(q[lm+q[km+1100>>2]>>2]+Jl<<2)>>2],20),(0|hm)!=(0|(Jl=Jl+1|0)););if(!(1<=(0|im)))break}km=q[$l>>2],lm=r[km+4|0]}if(!(lm>>>0<4)){if(lm=q[a+704>>2],Jl=q[lm+108>>2],1<=(0|(q[$l+604>>2]=Jl)))for(hm=q[a+1124>>2],nm=q[a+1128>>2],mm=q[a+1120>>2],om=q[$l+592>>2],pm=q[$l+608>>2];Il=pm+w(Jl=Jl+-1|0,12)|0,q[Il>>2]=q[(im=Jl<<2)+mm>>2],q[Il+4>>2]=q[im+nm>>2],q[Il+8>>2]=om+w(q[hm+im>>2],48),0<(0|Jl););if(Jl=q[lm+112>>2],1<=(0|(q[$l+620>>2]=Jl)))for(lm=q[a+1148>>2],hm=q[a+1152>>2],nm=q[a+1144>>2],mm=q[$l+592>>2],om=q[$l+624>>2];Il=om+w(Jl=Jl+-1|0,12)|0,q[Il>>2]=q[(im=Jl<<2)+nm>>2],q[Il+4>>2]=q[hm+im>>2],q[Il+8>>2]=mm+w(q[im+lm>>2],48),0<(0|Jl););if(im=q[km+1192>>2],Il=q[q[km+704>>2]+20>>2],q[$l+640>>2]=q[km+972>>2],lm=q[km+964>>2],q[$l+636>>2]=lm,!((0|Il)<(Jl=1))&&(q[lm>>2]=im+(q[q[km+968>>2]>>2]<<2),1!=(0|Il)))for(;q[(lm=Jl<<2)+q[$l+636>>2]>>2]=im+(q[lm+q[km+968>>2]>>2]<<2),(0|Il)!=(0|(Jl=Jl+1|0)););}}}else if(!(q[hm+20>>2]<1))for(hm=0;;){if(im=q[(nm=hm<<2)+q[$l+636>>2]>>2],1<=((Il=0)|(Jl=q[nm+q[km+952>>2]>>2])))for(pm=Jl+(mm=q[nm+q[km+948>>2]>>2])|0,qm=q[km+1060>>2],rm=q[km+1056>>2];;){if(1<=(0|(om=q[(Jl=mm<<2)+qm>>2])))for(sm=om+(lm=q[Jl+rm>>2])|0,tm=q[km+1192>>2];;){om=im+(Il<<2)|0,um=u[tm+(lm<<2)>>2],Jl=im;q:{if(0<(0|Il))for(;;){if(u[Jl>>2]==um)break q;if(!((Jl=Jl+4|0)>>>0>>0))break}u[om>>2]=um,Il=Il+1|0}if(!((0|(lm=lm+1|0))<(0|sm)))break}if(!((0|(mm=mm+1|0))<(0|pm)))break}if(function(a,Sm){var un,Kn,xn=0,yn=0,Jn=0;q[8+(L=un=L-208|0)>>2]=1,q[12+un>>2]=0;a:if(Kn=Sm<<2){for(q[16+un>>2]=4,Jn=Sm=q[20+un>>2]=4,xn=2;Sm=(Jn+4|0)+(yn=Sm)|0,q[(16+un|0)+(xn<<2)>>2]=Sm,xn=xn+1|0,Jn=yn,Sm>>>0>>0;);if((yn=(a+Kn|0)-4|0)>>>0<=a>>>0)Sm=xn=1;else for(Sm=xn=1;Sm=3==(3&xn)?(ta(a,Sm,16+un|0),ma(8+un|0,2),Sm+2|0):(t[(16+un|0)+((Jn=Sm+-1|0)<<2)>>2]>=yn-a>>>0?la(a,8+un|0,Sm,0,16+un|0):ta(a,Sm,16+un|0),1==(0|Sm)?(ka(8+un|0,1),0):(ka(8+un|0,Jn),1)),xn=1|q[8+un>>2],q[8+un>>2]=xn,(a=a+4|0)>>>0>>0;);for(la(a,8+un|0,Sm,0,16+un|0);;){e:{f:{g:{if(!(1!=(0|Sm)|1!=(0|xn))){if(q[12+un>>2])break g;break a}if(1<(0|Sm))break f}ma(8+un|0,yn=Oa(8+un|0)),xn=q[8+un>>2],Sm=Sm+yn|0;break e}ka(8+un|0,2),q[8+un>>2]=7^q[8+un>>2],ma(8+un|0,1),la((Jn=a+-4|0)-q[(16+un|0)+((yn=Sm+-2|0)<<2)>>2]|0,8+un|0,Sm+-1|0,1,16+un|0),ka(8+un|0,1),xn=1|q[8+un>>2],q[8+un>>2]=xn,la(Jn,8+un|0,yn,1,16+un|0),Sm=yn}a=a+-4|0}}L=208+un|0}(im,Il),q[nm+q[$l+640>>2]>>2]=Il,!((0|(hm=hm+1|0))>2]+20>>2]))break}if(!(r[a+4|0]<5|r[q[$l>>2]+4|0]<4)){if(Il=q[a+704>>2],Jl=q[Il+128>>2],1<=(0|(q[$l+596>>2]=Jl)))for(lm=q[a+1112>>2],hm=q[a+1116>>2],nm=q[a+1108>>2],mm=q[$l+592>>2],om=q[$l+600>>2];km=om+w(Jl=Jl+-1|0,12)|0,q[km>>2]=q[(im=Jl<<2)+nm>>2],q[km+4>>2]=q[hm+im>>2],q[km+8>>2]=mm+w(q[im+lm>>2],48),0<(0|Jl););if(Jl=q[Il+132>>2],1<=(0|(q[$l+612>>2]=Jl)))for(lm=q[a+1136>>2],hm=q[a+1140>>2],nm=q[a+1132>>2],mm=q[$l+592>>2],om=q[$l+616>>2];km=om+w(Jl=Jl+-1|0,12)|0,q[km>>2]=q[(im=Jl<<2)+nm>>2],q[km+4>>2]=q[hm+im>>2],q[km+8>>2]=mm+w(q[im+lm>>2],48),0<(0|Jl););if(Jl=q[Il+136>>2],!((0|(q[$l+628>>2]=Jl))<1))for(km=q[a+1160>>2],im=q[a+1164>>2],lm=q[a+1156>>2],hm=q[$l+592>>2],nm=q[$l+632>>2];a=nm+w(Jl=Jl+-1|0,12)|0,q[a>>2]=q[(Il=Jl<<2)+lm>>2],q[a+4>>2]=q[Il+im>>2],q[a+8>>2]=hm+w(q[Il+km>>2],48),0<(0|Jl););}ua($l)}return L=576+jm|0,$l}(a,Wa,Xa))break a;q[36+Ya>>2]=2209,q[32+Ya>>2]=2361,Y(4,1294,32+Ya|0)}else q[20+Ya>>2]=1444,q[16+Ya>>2]=2361,Y(4,1294,16+Ya|0);else q[4+Ya>>2]=2132,q[Ya>>2]=2361,Y(4,1294,Ya);Wa=0}return L=64+Ya|0,0|Wa}function xa(a){var Wa;return L=Wa=L-16|0,a=(a|=0)?function(a){var Il;return ca(16+(L=Il=L-576|0)|0,0,560),Fa(a,16+Il|0,12+Il|0),L=576+Il|0,q[12+Il>>2]}(a):(q[4+Wa>>2]=2132,q[Wa>>2]=2343,Y(4,1294,Wa),0),L=16+Wa|0,0|a}function ya(a){var Xa=r[a+4|0];X(q[a+704>>2],4,64),da(q[a+708>>2],4),da(q[a+708>>2]+4|0,4),da(q[a+708>>2]+8|0,4),da(q[a+708>>2]+12|0,4),da(q[a+708>>2]+16|0,4),da(q[a+708>>2]+20|0,1),X(q[a+720>>2],4,q[q[a+704>>2]>>2]),X(q[a+724>>2],4,q[q[a+704>>2]>>2]),X(q[a+728>>2],4,q[q[a+704>>2]>>2]),X(q[a+732>>2],4,q[q[a+704>>2]>>2]),X(q[a+736>>2],4,q[q[a+704>>2]>>2]),X(q[a+740>>2],4,q[q[a+704>>2]>>2]),X(q[a+752>>2],4,q[q[a+704>>2]+4>>2]),X(q[a+756>>2],4,q[q[a+704>>2]+4>>2]),X(q[a+760>>2],4,q[q[a+704>>2]+4>>2]),X(q[a+764>>2],4,q[q[a+704>>2]+4>>2]),X(q[a+768>>2],4,q[q[a+704>>2]+4>>2]),X(q[a+772>>2],4,q[q[a+704>>2]+4>>2]),X(q[a+776>>2],4,q[q[a+704>>2]+4>>2]),X(q[a+780>>2],4,q[q[a+704>>2]+8>>2]),X(q[a+784>>2],4,q[q[a+704>>2]+8>>2]),X(q[a+788>>2],4,q[q[a+704>>2]+8>>2]),X(q[a+796>>2],4,q[q[a+704>>2]+8>>2]),X(q[a+800>>2],4,q[q[a+704>>2]+8>>2]),X(q[a+804>>2],4,q[q[a+704>>2]+8>>2]),X(q[a+812>>2],4,q[q[a+704>>2]+12>>2]),X(q[a+816>>2],4,q[q[a+704>>2]+12>>2]),X(q[a+820>>2],4,q[q[a+704>>2]+12>>2]),X(q[a+828>>2],4,q[q[a+704>>2]+12>>2]),X(q[a+852>>2],4,q[q[a+704>>2]+16>>2]),X(q[a+856>>2],4,q[q[a+704>>2]+16>>2]),X(q[a+860>>2],4,q[q[a+704>>2]+16>>2]),X(q[a+868>>2],4,q[q[a+704>>2]+16>>2]),X(q[a+872>>2],4,q[q[a+704>>2]+16>>2]),X(q[a+876>>2],4,q[q[a+704>>2]+16>>2]),X(q[a+880>>2],4,q[q[a+704>>2]+16>>2]),X(q[a+884>>2],4,q[q[a+704>>2]+16>>2]),X(q[a+888>>2],1,q[q[a+704>>2]+16>>2]),X(q[a+892>>2],4,q[q[a+704>>2]+16>>2]),X(q[a+896>>2],4,q[q[a+704>>2]+16>>2]),X(q[a+900>>2],4,q[q[a+704>>2]+16>>2]),X(q[a+904>>2],4,q[q[a+704>>2]+16>>2]),X(q[a+908>>2],4,q[q[a+704>>2]+16>>2]),X(q[a+912>>2],4,q[q[a+704>>2]+16>>2]),X(q[a+924>>2],4,q[q[a+704>>2]+20>>2]),X(q[a+928>>2],4,q[q[a+704>>2]+20>>2]),X(q[a+932>>2],4,q[q[a+704>>2]+20>>2]),X(q[a+936>>2],4,q[q[a+704>>2]+20>>2]),X(q[a+940>>2],4,q[q[a+704>>2]+20>>2]),X(q[a+948>>2],4,q[q[a+704>>2]+20>>2]),X(q[a+952>>2],4,q[q[a+704>>2]+20>>2]),X(q[a+976>>2],4,q[q[a+704>>2]+24>>2]),X(q[a+980>>2],4,q[q[a+704>>2]+28>>2]),X(q[a+984>>2],4,q[q[a+704>>2]+28>>2]),X(q[a+996>>2],4,q[q[a+704>>2]+32>>2]),X(q[a+1e3>>2],4,q[q[a+704>>2]+32>>2]),X(q[a+1004>>2],4,q[q[a+704>>2]+32>>2]),X(q[a+1008>>2],4,q[q[a+704>>2]+32>>2]),X(q[a+1012>>2],4,q[q[a+704>>2]+32>>2]),X(q[a+1016>>2],4,q[q[a+704>>2]+32>>2]),X(q[a+1020>>2],4,q[q[a+704>>2]+32>>2]),X(q[a+1032>>2],4,q[q[a+704>>2]+36>>2]),X(q[a+1036>>2],4,q[q[a+704>>2]+36>>2]),X(q[a+1040>>2],4,q[q[a+704>>2]+36>>2]),X(q[a+1052>>2],4,q[q[a+704>>2]+40>>2]),X(q[a+1064>>2],4,q[q[a+704>>2]+44>>2]),X(q[a+1068>>2],4,q[q[a+704>>2]+48>>2]),X(q[a+1072>>2],4,q[q[a+704>>2]+48>>2]),X(q[a+1056>>2],4,q[q[a+704>>2]+52>>2]),X(q[a+1060>>2],4,q[q[a+704>>2]+52>>2]),X(q[a+1192>>2],4,q[q[a+704>>2]+56>>2]),X(q[a+1196>>2],4,q[q[a+704>>2]+60>>2]),X(q[a+1200>>2],2,q[q[a+704>>2]+64>>2]),X(q[a+1204>>2],4,q[q[a+704>>2]+68>>2]),X(q[a+1208>>2],4,q[q[a+704>>2]+72>>2]),X(q[a+1212>>2],4,q[q[a+704>>2]+72>>2]),X(q[a+1216>>2],4,q[q[a+704>>2]+72>>2]),X(q[a+1220>>2],4,q[q[a+704>>2]+72>>2]),X(q[a+1224>>2],4,q[q[a+704>>2]+72>>2]),X(q[a+1228>>2],4,q[q[a+704>>2]+76>>2]),X(q[a+1232>>2],4,q[q[a+704>>2]+76>>2]),X(q[a+1236>>2],4,q[q[a+704>>2]+76>>2]),X(q[a+1248>>2],4,q[q[a+704>>2]+80>>2]),X(q[a+1252>>2],4,q[q[a+704>>2]+80>>2]),X(q[a+1256>>2],4,q[q[a+704>>2]+80>>2]),X(q[a+1260>>2],4,q[q[a+704>>2]+80>>2]),X(q[a+1264>>2],4,q[q[a+704>>2]+80>>2]),X(q[a+1268>>2],4,q[q[a+704>>2]+80>>2]),X(q[a+1272>>2],4,q[q[a+704>>2]+80>>2]),X(q[a+1276>>2],4,q[q[a+704>>2]+84>>2]),X(q[a+1280>>2],2,q[q[a+704>>2]+84>>2]),X(q[a+1284>>2],4,q[q[a+704>>2]+88>>2]),Xa>>>0<2||(X(q[a+808>>2],4,q[q[a+704>>2]+8>>2]),Xa>>>0<4)||(X(q[a+968>>2],4,q[q[a+704>>2]+20>>2]),X(q[a+972>>2],4,q[q[a+704>>2]+20>>2]),X(q[a+792>>2],4,q[q[a+704>>2]+8>>2]),X(q[a+824>>2],4,q[q[a+704>>2]+12>>2]),X(q[a+864>>2],4,q[q[a+704>>2]+16>>2]),X(q[a+1288>>2],4,q[q[a+704>>2]+92>>2]),X(q[a+1292>>2],4,q[q[a+704>>2]+92>>2]),X(q[a+1296>>2],4,q[q[a+704>>2]+92>>2]),X(q[a+1300>>2],4,q[q[a+704>>2]+96>>2]),X(q[a+1304>>2],4,q[q[a+704>>2]+96>>2]),X(q[a+1308>>2],4,q[q[a+704>>2]+96>>2]),X(q[a+944>>2],4,q[q[a+704>>2]+20>>2]),X(q[a+956>>2],4,q[q[a+704>>2]+20>>2]),X(q[a+960>>2],4,q[q[a+704>>2]+20>>2]),X(q[a+1076>>2],4,q[q[a+704>>2]+100>>2]),X(q[a+1080>>2],4,q[q[a+704>>2]+100>>2]),X(q[a+1084>>2],4,q[q[a+704>>2]+100>>2]),X(q[a+1088>>2],4,q[q[a+704>>2]+104>>2]),X(q[a+1092>>2],4,q[q[a+704>>2]+104>>2]),X(q[a+1096>>2],4,q[q[a+704>>2]+104>>2]),X(q[a+1100>>2],4,q[q[a+704>>2]+104>>2]),X(q[a+1104>>2],4,q[q[a+704>>2]+104>>2]),X(q[a+1120>>2],4,q[q[a+704>>2]+108>>2]),X(q[a+1124>>2],4,q[q[a+704>>2]+108>>2]),X(q[a+1128>>2],4,q[q[a+704>>2]+108>>2]),X(q[a+1144>>2],4,q[q[a+704>>2]+112>>2]),X(q[a+1148>>2],4,q[q[a+704>>2]+112>>2]),X(q[a+1152>>2],4,q[q[a+704>>2]+112>>2]),X(q[a+1168>>2],4,q[q[a+704>>2]+116>>2]),X(q[a+1172>>2],4,q[q[a+704>>2]+120>>2]),X(q[a+1176>>2],4,q[q[a+704>>2]+120>>2]),X(q[a+1180>>2],4,q[q[a+704>>2]+120>>2]),X(q[a+1184>>2],4,q[q[a+704>>2]+124>>2]),X(q[a+1188>>2],4,q[q[a+704>>2]+124>>2]),4!=(0|Xa)&&(X(q[a+988>>2],4,q[q[a+704>>2]+28>>2]),X(q[a+992>>2],4,q[q[a+704>>2]+28>>2]),X(q[a+1024>>2],4,q[q[a+704>>2]+32>>2]),X(q[a+1028>>2],4,q[q[a+704>>2]+32>>2]),X(q[a+1044>>2],4,q[q[a+704>>2]+36>>2]),X(q[a+1048>>2],4,q[q[a+704>>2]+36>>2]),X(q[a+1108>>2],4,q[q[a+704>>2]+128>>2]),X(q[a+1112>>2],4,q[q[a+704>>2]+128>>2]),X(q[a+1116>>2],4,q[q[a+704>>2]+128>>2]),X(q[a+1132>>2],4,q[q[a+704>>2]+132>>2]),X(q[a+1136>>2],4,q[q[a+704>>2]+132>>2]),X(q[a+1140>>2],4,q[q[a+704>>2]+132>>2]),X(q[a+1156>>2],4,q[q[a+704>>2]+136>>2]),X(q[a+1160>>2],4,q[q[a+704>>2]+136>>2]),X(q[a+1164>>2],4,q[q[a+704>>2]+136>>2])))}function za(a,Za){var _a=0,lb=0,mb=0,ob=0,pb=0,rb=0,nb=a+Za|0;a:{b:if(!(1&(_a=q[a+4>>2]))){if(!(3&_a))break a;if(Za=(_a=q[a>>2])+Za|0,(0|(a=a-_a|0))!=q[2092])if(_a>>>0<=255)mb=_a>>>3,_a=q[a+8>>2],(0|(lb=q[a+12>>2]))==(0|_a)?(rb=q[2087]&ed(mb),q[2087]=rb):(q[_a+12>>2]=lb,q[lb+8>>2]=_a);else{if(pb=q[a+24>>2],(0|(_a=q[a+12>>2]))!=(0|a))lb=q[a+8>>2],q[lb+12>>2]=_a,q[_a+8>>2]=lb;else if(mb=(mb=q[(lb=a+20|0)>>2])||q[(lb=a+16|0)>>2]){for(;ob=lb,(mb=q[(lb=(_a=mb)+20|0)>>2])||(lb=_a+16|0,mb=q[_a+16>>2]););q[ob>>2]=0}else _a=0;if(pb){lb=q[a+28>>2];e:{if(q[(mb=8652+(lb<<2)|0)>>2]==(0|a)){if(q[mb>>2]=_a)break e;rb=q[2088]&ed(lb),q[2088]=rb;break b}if(!(q[pb+(q[pb+16>>2]==(0|a)?16:20)>>2]=_a))break b}q[_a+24>>2]=pb,(lb=q[a+16>>2])&&(q[_a+16>>2]=lb,q[lb+24>>2]=_a),(lb=q[a+20>>2])&&(q[_a+20>>2]=lb,q[lb+24>>2]=_a)}}else if(3==(3&(_a=q[4+nb>>2])))return q[2089]=Za,q[4+nb>>2]=-2&_a,q[a+4>>2]=1|Za,q[nb>>2]=Za}f:{if(!(2&(_a=q[4+nb>>2]))){if(q[2093]==(0|nb)){if(q[2093]=a,Za=q[2090]+Za|0,q[2090]=Za,q[a+4>>2]=1|Za,q[2092]!=(0|a))break a;return q[2089]=0,q[2092]=0}if(q[2092]==(0|nb))return q[2092]=a,Za=q[2089]+Za|0,q[2089]=Za,q[a+4>>2]=1|Za,q[a+Za>>2]=Za;Za=(-8&_a)+Za|0;g:if(_a>>>0<=255)mb=_a>>>3,_a=q[8+nb>>2],(0|(lb=q[12+nb>>2]))==(0|_a)?(rb=q[2087]&ed(mb),q[2087]=rb):(q[_a+12>>2]=lb,q[lb+8>>2]=_a);else{if(pb=q[24+nb>>2],(0|nb)!=(0|(_a=q[12+nb>>2])))lb=q[8+nb>>2],q[lb+12>>2]=_a,q[_a+8>>2]=lb;else if(mb=(mb=q[(lb=20+nb|0)>>2])||q[(lb=16+nb|0)>>2]){for(;ob=lb,(mb=q[(lb=(_a=mb)+20|0)>>2])||(lb=_a+16|0,mb=q[_a+16>>2]););q[ob>>2]=0}else _a=0;if(pb){lb=q[28+nb>>2];j:{if(q[(mb=8652+(lb<<2)|0)>>2]==(0|nb)){if(q[mb>>2]=_a)break j;rb=q[2088]&ed(lb),q[2088]=rb;break g}if(!(q[pb+(q[pb+16>>2]==(0|nb)?16:20)>>2]=_a))break g}q[_a+24>>2]=pb,(lb=q[16+nb>>2])&&(q[_a+16>>2]=lb,q[lb+24>>2]=_a),(lb=q[20+nb>>2])&&(q[_a+20>>2]=lb,q[lb+24>>2]=_a)}}if(q[a+4>>2]=1|Za,q[a+Za>>2]=Za,q[2092]!=(0|a))break f;return q[2089]=Za}q[4+nb>>2]=-2&_a,q[a+4>>2]=1|Za,q[a+Za>>2]=Za}if(Za>>>0<=255)return Za=8388+((_a=Za>>>3)<<3)|0,_a=(lb=q[2087])&(_a=1<<_a)?q[Za+8>>2]:(q[2087]=_a|lb,Za),q[Za+8>>2]=a,q[_a+12>>2]=a,q[a+12>>2]=Za,q[a+8>>2]=_a;q[a+16>>2]=0,_a=q[a+20>>2]=0,(mb=Za>>>8)&&(_a=31,16777215>>0||(_a=28+((_a=((nb=(mb<<=ob=mb+1048320>>>16&8)<<(_a=mb+520192>>>16&4))<<(mb=245760+nb>>>16&2)>>>15)-(mb|_a|ob)|0)<<1|Za>>>_a+21&1)|0)),mb=8652+((q[(lb=a)+28>>2]=_a)<<2)|0;m:{if((lb=q[2088])&(ob=1<<_a)){for(lb=Za<<(31==(0|_a)?0:25-(_a>>>1)|0),_a=q[mb>>2];;){if((-8&q[(mb=_a)+4>>2])==(0|Za))break m;if(_a=lb>>>29,lb<<=1,!(_a=q[16+(ob=mb+(4&_a)|0)>>2]))break}q[ob+16>>2]=a}else q[2088]=lb|ob,q[mb>>2]=a;return q[a+24>>2]=mb,q[a+12>>2]=a,q[a+8>>2]=a}Za=q[mb+8>>2],q[Za+12>>2]=a,q[mb+8>>2]=a,q[a+24>>2]=0,q[a+12>>2]=mb,q[a+8>>2]=Za}}function Aa(a){var vb,xb,yb,Ab,Bb,Cb,sb,wb,Za=x(0),tb=(x(0),0),ub=0,zb=(x(0),x(0),x(0),x(0),0);x(0),x(0);a:{b:{if(j(a),ub=2147483647&(tb=b[0])){if(!(ub>>>0<2139095041))return x(x(.10000000149011612)+a);if(1065353216==(0|ub))return x(-1<(0|tb)?.10000000149011612:10);if(2139095040==(0|ub))return x(-1<(0|tb)?0:-a);if(1073741824==(0|tb))return x(.010000000707805157);if(1056964608==(0|tb))return x(.3162277638912201);if(1291845633<=ub>>>0)return x((0|tb)<0?H:0);if(vb=u[1701],wb=x(x(1.600000023841858)-vb),xb=x(x(1)/x(vb+x(1.600000023841858))),f(0,-4096&(j(sb=x(wb*xb)),b[0])),Za=k(),yb=x(Za*Za),Bb=u[1705],vb=x(xb*x(x(wb-x((Ab=Za)*x(3.099609375)))-x(Za*x(x(1.600000023841858)-x(x(3.099609375)-vb))))),xb=x(x(sb+Za)*vb),Za=x(sb*sb),wb=x(xb+x(x(Za*Za)*x(x(Za*x(x(Za*x(x(Za*x(x(Za*x(x(Za*x(.20697501301765442))+x(.23066075146198273)))+x(.2727281153202057)))+x(.3333333432674408)))+x(.4285714328289032)))+x(.6000000238418579)))),f(0,-4096&(j(x(x(yb+x(3))+wb)),b[0])),Za=k(),xb=x(Ab*Za),sb=x(x(vb*Za)+x(sb*x(wb-x(x(Za+x(-3))-yb)))),f(0,-4096&(j(x(xb+sb)),b[0])),Za=k(),vb=x(Za*x(.9619140625)),yb=x(u[1703]+x(x(x(sb-x(Za-xb))*x(.9617967009544373))+x(Za*x(-.00011736857413779944)))),f(0,-4096&(j(x(x(Bb+x(vb+yb))+x(-4))),b[0])),sb=k(),f(0,-4096&tb),wb=k(),Za=x(sb*wb),a=x(x(x(yb-x(x(x(sb-x(-4))-Bb)-vb))*a)+x(x(a-wb)*sb)),j(sb=x(Za+a)),1124073473<=(0|(tb=b[0])))break b;d:{if((ub=1124073472)==(0|tb)){if(x(a+x(4.299566569443414e-8))>x(sb-Za))break b}else{if(ub=2147483647&tb,!(a<=x(sb-Za)^1|-1021968384!=(0|tb))|1125515265<=ub>>>0)break a;if(ub>>>0<1056964609)break d}zb=(8388607&(ub=(8388608>>>(ub>>>23)-126)+tb|0)|8388608)>>>150-(Cb=ub>>>23&255),zb=(0|tb)<0?0-zb|0:zb,Za=x(Za-(f(0,ub&-8388608>>Cb-127),k())),j(x(a+Za)),tb=b[0]}f(0,-32768&tb),sb=k(),vb=x(sb*x(.693145751953125)),sb=x(x(sb*x(14286065379565116e-22))+x(x(a-x(sb-Za))*x(.6931471824645996))),a=x(vb+sb),Za=x(a*a),Za=x(a-x(Za*x(x(Za*x(x(Za*x(x(Za*x(x(Za*x(4.138136944220605e-8))+x(-16533901998627698e-22)))+x(661375597701408e-19)))+x(-.0027777778450399637)))+x(.1666666716337204)))),Ab=x(x(a*Za)/x(Za+x(-2))),Za=x(sb-x(a-vb)),a=(0|(tb=0|(j(a=x(x(a-x(Ab-x(Za+x(a*Za))))+x(1))),b[0]+(zb<<23))))<=8388607?function(a,Vk){var zl=0;return 128<=(0|Vk)?(a=x(a*x(17014118346046923e22)),Vk=(0|(zl=Vk+-127|0))<128?zl:(a=x(a*x(17014118346046923e22)),((0|Vk)<381?Vk:381)+-254|0)):-127<(0|Vk)||(a=x(a*x(11754943508222875e-54)),Vk=-127<(0|(zl=Vk+126|0))?zl:(a=x(a*x(11754943508222875e-54)),(-378<(0|Vk)?Vk:-378)+252|0)),x(a*(f(0,1065353216+(Vk<<23)|0),k()))}(a,zb):(f(0,tb),k()),a=x(x(1)*a)}else a=x(1);return a}return x(H)}return x(0)}function Ba(a,Db){var Jb,Eb,Gb,Fb=0,Hb=0,Ib=x(0);if(j(Db),!((Gb=2147483647&(Eb=b[0]))>>>0<=2139095040&&(j(a),(Fb=2147483647&(Hb=b[0]))>>>0<2139095041)))return x(a+Db);if(1065353216==(0|Eb))return Ca(a);Eb=(Jb=Eb>>>30&2)|Hb>>>31;b:{c:{d:{e:{if(!Fb){switch(Eb-2|0){case 0:break e;case 1:break;default:break d}return x(-3.1415927410125732)}if(2139095040!=(0|Gb)){if(!Gb|!(Fb>>>0<=218103808+Gb>>>0&&2139095040!=(0|Fb)))break b;if(a=Ib=Fb+218103808>>>0>>0&&(Ib=x(0),Jb)?Ib:Ca(x(y(x(a/Db)))),Eb>>>0<=2){switch(Eb-1|0){case 0:return x(-a);case 1:break;default:break d}return x(x(3.1415927410125732)-x(a+x(8.742277657347586e-8)))}return x(x(a+x(8.742277657347586e-8))+x(-3.1415927410125732))}if(2139095040==(0|Fb))break c;return u[6784+(Eb<<2)>>2]}a=x(3.1415927410125732)}return a}return u[6768+(Eb<<2)>>2]}return x((0|Hb)<0?-1.5707963705062866:1.5707963705062866)}function Ca(a){x(0);var Kb,Nb,Ob,Db,Mb,Lb=0;x(0),x(0),j(a);a:{if(1283457024<=(Db=2147483647&(Mb=b[0]))>>>0){if(2139095040>>0)break a;return x((0|Mb)<0?-1.570796251296997:1.570796251296997)}b:{if(Db>>>0<=1054867455){if(Lb=-1,964689920<=Db>>>0)break b;break a}a=x(y(a)),Lb=Db>>>0<=1066926079?Db>>>0<=1060110335?(a=x(x(x(a+a)+x(-1))/x(a+x(2))),0):(a=x(x(a+x(-1))/x(a+x(1))),1):Db>>>0<=1075576831?(a=x(x(a+x(-1.5))/x(x(a*x(1.5))+x(1))),2):(a=x(x(-1)/a),3)}if(Db=Lb,Nb=x(a*a),Kb=x(Nb*Nb),Ob=x(Kb*x(x(Kb*x(-.106480173766613))+x(-.19999158382415771))),Kb=x(Nb*x(x(Kb*x(x(Kb*x(.06168760731816292))+x(.14253635704517365)))+x(.333333283662796))),(0|Db)<=-1)return x(a-x(a*x(Ob+Kb)));a=x(u[6736+(Db<<=2)>>2]-x(x(x(a*x(Ob+Kb))-u[6752+Db>>2])-a)),a=(0|Mb)<0?x(-a):a}return a}function Da(a,Pb){var Ub,Sb,Tb,Qb=0,Rb=0;return L=Sb=L-16|0,j(a),(Qb=2147483647&(Tb=b[0]))>>>0<=1305022426?(v[Pb>>3]=(Ub=+a)+-1.5707963109016418*(Rb=.6366197723675814*Ub+6755399441055744-6755399441055744)+-1.5893254773528196e-8*Rb,Qb=y(Rb)<2147483648?~~Rb:-2147483648):2139095040<=Qb>>>0?(v[Pb>>3]=x(a-a),Qb=0):(Ub=Qb,v[8+Sb>>3]=(f(0,Ub-((Qb=(Qb>>>23)-150|0)<<23)|0),k()),Qb=function(a,Il,Jl){var Nl,Sl,Wl,Xl,Zl,_l,Kl=0,Ll=0,Ml=0,Ol=0,Pl=0,Ql=0,Rl=0,Tl=0,Ul=0,Vl=0,Yl=0;if(L=Nl=L-560|0,Rl=(Ll=Jl)+w(Wl=0<(0|(Jl=(Jl+-3|0)/24|0))?Jl:0,-24)|0,0<=(0|(Sl=q[972])))for(Ll=Sl+1|0,Jl=Wl;v[(320+Nl|0)+(Ml<<3)>>3]=(0|Jl)<0?0:+q[3904+(Jl<<2)>>2],Jl=Jl+1|0,(0|Ll)!=(0|(Ml=Ml+1|0)););for(Pl=Rl+-24|0,Ll=0;;){for(Kl=Jl=0;Kl+=v[(Jl<<3)+a>>3]*v[(320+Nl|0)+(Ll-Jl<<3)>>3],1!=(0|(Jl=Jl+1|0)););if(v[(Ll<<3)+Nl>>3]=Kl,Jl=(0|Ll)<(0|Sl),Ll=Ll+1|0,!Jl)break}_l=23-Pl|0,Xl=24-Pl|0,Ll=Sl;a:{for(;;){if(Kl=v[(Ll<<3)+Nl>>3],!(Ul=((Jl=0)|(Ml=Ll))<1))for(;Ql=(480+Nl|0)+(Jl<<2)|0,Tl=Kl,Ol=y(Kl*=5.960464477539063e-8)<2147483648?~~Kl:-2147483648,Ol=y(Tl+=-16777216*(Kl=0|Ol))<2147483648?~~Tl:-2147483648,q[Ql>>2]=Ol,Kl=v[((Ml=Ml+-1|0)<<3)+Nl>>3]+Kl,(0|Ll)!=(0|(Jl=Jl+1|0)););Kl=ja(Kl,Pl),Kl=(Kl+=-8*C(.125*Kl))-(0|(Ql=y(Kl)<2147483648?~~Kl:-2147483648));e:{f:{g:{if(Yl=(0|Pl)<1){if(Pl)break g;Ol=q[476+((Ll<<2)+Nl|0)>>2]>>23}else Ol=q[476+(Ml=(Ll<<2)+Nl|0)>>2],Vl=Ml,Ml=Ol-((Jl=Ol>>Xl)<>2]=Ml)>>_l;if((0|Ol)<1)break e;break f}if(Ol=2,!(.5<=Kl)){Ol=0;break e}}if(Ml=Jl=0,!Ul)for(;;){Ul=q[(Zl=(480+Nl|0)+(Jl<<2)|0)>>2],Vl=16777215;i:{j:{if(!Ml){if(!Ul)break j;Vl=16777216,Ml=1}q[Zl>>2]=Vl-Ul;break i}Ml=0}if((0|Ll)==(0|(Jl=Jl+1|0)))break}Yl||1<(Jl=Pl+-1|0)>>>0||(q[476+(Jl=(Ll<<2)+Nl|0)>>2]=Jl-1?8388607&q[Jl+476>>2]:4194303&q[Jl+476>>2]),Ql=Ql+1|0,2==(0|Ol)&&(Kl=1-Kl,Ol=2,Ml)&&(Kl-=ja(1,Pl))}if(0!=Kl)break;if(!(((Ml=0)|(Jl=Ll))<=(0|Sl))){for(;Ml=q[(480+Nl|0)+((Jl=Jl+-1|0)<<2)>>2]|Ml,(0|Sl)<(0|Jl););if(Ml){for(Rl=Pl;Rl=Rl+-24|0,!q[(480+Nl|0)+((Ll=Ll+-1|0)<<2)>>2];);break a}}for(Jl=1;Jl=(Ml=Jl)+1|0,!q[(480+Nl|0)+(Sl-Ml<<2)>>2];);for(Ml=Ll+Ml|0;;){for(Ll=Ql=Ll+1|0,v[(320+Nl|0)+(Ql<<3)>>3]=q[3904+(Wl+Ll<<2)>>2],Kl=Jl=0;Kl+=v[(Jl<<3)+a>>3]*v[(320+Nl|0)+(Ql-Jl<<3)>>3],1!=(0|(Jl=Jl+1|0)););if(v[(Ll<<3)+Nl>>3]=Kl,!((0|Ll)<(0|Ml)))break}Ll=Ml}16777216<=(Kl=ja(Kl,0-Pl|0))?(a=(480+Nl|0)+(Ll<<2)|0,Tl=Kl,Jl=y(Kl*=5.960464477539063e-8)<2147483648?~~Kl:-2147483648,Ml=y(Kl=Tl+-16777216*(0|Jl))<2147483648?~~Kl:-2147483648,q[a>>2]=Ml,Ll=Ll+1|0):(Jl=y(Kl)<2147483648?~~Kl:-2147483648,Rl=Pl),q[(480+Nl|0)+(Ll<<2)>>2]=Jl}if(Kl=ja(1,Rl),!((0|Ll)<=-1)){for(Jl=Ll;v[(Jl<<3)+Nl>>3]=Kl*+q[(480+Nl|0)+(Jl<<2)>>2],Kl*=5.960464477539063e-8,a=0<(0|Jl),Jl=Jl+-1|0,a;);if(!((0|Ll)<=-1))for(Jl=Ll;;){for(Pl=Ll-(a=Jl)|0,Jl=Kl=0;Kl+=v[6672+(Jl<<3)>>3]*v[(a+Jl<<3)+Nl>>3],!((0|Sl)<=(0|Jl))&&(Rl=Jl>>>0>>0,Jl=Jl+1|0,Rl););if(v[(160+Nl|0)+(Pl<<3)>>3]=Kl,Jl=a+-1|0,!(0<(0|a)))break}}if(0<=(Ll|(Kl=0)))for(;Kl+=v[(160+Nl|0)+(Ll<<3)>>3],a=0<(0|Ll),Ll=Ll+-1|0,a;);return v[Il>>3]=Ol?-Kl:Kl,L=560+Nl|0,7&Ql}(8+Sb|0,Sb,Qb),Rb=v[Sb>>3],(0|Tb)<=-1?(v[Pb>>3]=-Rb,Qb=0-Qb|0):v[Pb>>3]=Rb),L=16+Sb|0,Qb}function Ea(a,Pb){return a?function(a,Il){a:{if(a){if(Il>>>0<=127)break a;if(q[q[1789]>>2]){if(Il>>>0<=2047)return o[a+1|0]=63&Il|128,o[0|a]=Il>>>6|192,2;if(!(57344!=(-8192&Il)&&55296<=Il>>>0))return o[a+2|0]=63&Il|128,o[0|a]=Il>>>12|224,o[a+1|0]=Il>>>6&63|128,3;if(Il+-65536>>>0<=1048575)return o[a+3|0]=63&Il|128,o[0|a]=Il>>>18|240,o[a+2|0]=Il>>>6&63|128,o[a+1|0]=Il>>>12&63|128,4}else if(57216==(-128&Il))break a;q[2086]=25,a=-1}else a=1;return a}return o[0|a]=Il,1}(a,Pb):0}function Fa(a,Pb,Wb){var fc,gc,Xb=0,Yb=0,Zb=0,_b=0,$b=0,ac=0,bc=0,cc=0,dc=0,ec=r[a+4|0];if(q[Pb>>2]=652,Yb=q[a+704>>2],1<=(0|(_b=q[Yb>>2]))){for($b=q[a+720>>2],bc=q[a+1072>>2];Zb=(1<>2]<<2)>>2])+Zb|0,(0|_b)!=(0|(Xb=Xb+1|0)););Xb=Zb<<2}if(q[Pb+4>>2]=w(_b,12),q[Pb+8>>2]=q[Yb>>2]<<2,q[Pb+12>>2]=q[Yb>>2]<<2,q[Pb+16>>2]=q[Yb>>2]<<2,q[Pb+20>>2]=q[Yb>>2]<<2,Zb=q[Yb>>2],q[Pb+28>>2]=Xb,q[Pb+24>>2]=Zb<<2,Zb=q[Yb>>2],q[Pb+40>>2]=Xb,q[Pb+36>>2]=Xb,q[Pb+32>>2]=Zb<<2,q[Pb+44>>2]=q[Yb+4>>2]<<5,q[Pb+48>>2]=q[Yb+4>>2]<<2,q[Pb+52>>2]=q[Yb+4>>2]<<2,q[Pb+56>>2]=q[Yb+4>>2]<<2,q[Pb+60>>2]=q[Yb+4>>2]<<4,q[Pb+64>>2]=q[Yb+4>>2]<<4,1<=((Xb=0)|(_b=q[Yb+8>>2]))){for($b=q[a+780>>2],bc=q[a+1072>>2],dc=q[a+796>>2],Zb=0;ac=(15+(q[(cc=Xb<<2)+dc>>2]<<3)&-16)+ac|0,Zb=(1<>2]<<2)>>2])+Zb|0,(0|_b)!=(0|(Xb=Xb+1|0)););Xb=Zb<<2}if(q[Pb+68>>2]=w(_b,24),q[Pb+72>>2]=q[Yb+8>>2]<<2,q[Pb+76>>2]=q[Yb+8>>2]<<2,Zb=q[Yb+8>>2],q[Pb+84>>2]=ac,q[Pb+80>>2]=Zb<<2,q[Pb+88>>2]=q[Yb+8>>2]<<4,q[Pb+92>>2]=q[Yb+8>>2]<<4,Zb=q[Yb+8>>2],q[Pb+100>>2]=Xb,q[Pb+96>>2]=Zb<<2,Zb=q[Yb+8>>2],q[Pb+140>>2]=Xb,q[Pb+136>>2]=Xb,q[Pb+132>>2]=Xb,q[Pb+128>>2]=Xb,q[Pb+124>>2]=Xb,q[Pb+120>>2]=Xb,q[Pb+116>>2]=Xb,q[Pb+112>>2]=Xb,q[Pb+108>>2]=Xb,q[Pb+104>>2]=Zb<<2,q[Pb+144>>2]=q[Yb+8>>2]<<2,q[Pb+148>>2]=q[Yb+8>>2]<<2,q[Pb+152>>2]=q[Yb+8>>2]<<2,q[Pb+156>>2]=q[Yb+8>>2]<<2,q[Pb+160>>2]=q[Yb+8>>2]<<2,q[Pb+164>>2]=q[Yb+8>>2]<<2,1<=((Xb=ac=0)|(_b=q[Yb+12>>2]))){for($b=q[a+812>>2],bc=q[a+1072>>2],Zb=0;Zb=(1<>2]<<2)>>2])+Zb|0,(0|_b)!=(0|(Xb=Xb+1|0)););Xb=Zb<<2}if(q[Pb+168>>2]=w(_b,12),q[Pb+172>>2]=q[Yb+12>>2]<<2,q[Pb+176>>2]=q[Yb+12>>2]<<2,q[Pb+180>>2]=q[Yb+12>>2]<<2,q[Pb+184>>2]=q[Yb+12>>2]<<2,q[Pb+188>>2]=q[Yb+12>>2]<<2,q[Pb+192>>2]=q[Yb+12>>2]<<2,q[Pb+196>>2]=q[Yb+12>>2]<<2,q[Pb+200>>2]=q[Yb+12>>2]<<2,q[Pb+204>>2]=q[Yb+12>>2]<<4,q[Pb+208>>2]=q[Yb+12>>2]<<4,Zb=q[Yb+12>>2],q[Pb+216>>2]=Xb,q[Pb+212>>2]=Zb<<2,Zb=q[Yb+12>>2],q[Pb+268>>2]=Xb,q[Pb+264>>2]=Xb,q[Pb+260>>2]=Xb,q[Pb+256>>2]=Xb,q[Pb+252>>2]=Xb,q[Pb+248>>2]=Xb,q[Pb+244>>2]=Xb,q[Pb+240>>2]=Xb,q[Pb+236>>2]=Xb,q[Pb+232>>2]=Xb,q[Pb+228>>2]=Xb,q[Pb+224>>2]=Xb,q[Pb+220>>2]=Zb<<2,q[Pb+272>>2]=q[Yb+12>>2]<<2,q[Pb+276>>2]=q[Yb+12>>2]<<2,q[Pb+280>>2]=q[Yb+12>>2]<<2,q[Pb+284>>2]=q[Yb+12>>2]<<2,q[Pb+288>>2]=q[Yb+12>>2]<<2,q[Pb+292>>2]=q[Yb+12>>2]<<2,1<=((Xb=0)|(Zb=q[Yb+16>>2]))){for($b=q[a+852>>2],bc=q[a+1072>>2],dc=q[a+892>>2],_b=0;ac=(15+(q[(cc=Xb<<2)+dc>>2]<<3)&-16)+ac|0,_b=(1<>2]<<2)>>2])+_b|0,(0|Zb)!=(0|(Xb=Xb+1|0)););Xb=_b<<2}if(q[Pb+296>>2]=w(Zb,20),q[Pb+300>>2]=q[Yb+16>>2]<<2,q[Pb+304>>2]=q[Yb+16>>2],q[Pb+308>>2]=q[Yb+16>>2]<<2,q[Pb+312>>2]=q[Yb+16>>2]<<2,Zb=q[Yb+16>>2],q[Pb+320>>2]=ac,q[Pb+316>>2]=Zb<<2,q[Pb+324>>2]=q[Yb+16>>2]<<2,q[Pb+328>>2]=q[Yb+16>>2]<<4,q[Pb+332>>2]=q[Yb+16>>2]<<4,q[Pb+336>>2]=q[Yb+16>>2]<<2,q[Pb+340>>2]=q[Yb+16>>2]<<2,q[Pb+344>>2]=q[Yb+16>>2]<<2,q[Pb+348>>2]=q[Yb+16>>2]<<4,q[Pb+352>>2]=q[Yb+16>>2]<<4,Zb=q[Yb+16>>2],q[Pb+360>>2]=Xb,q[Pb+356>>2]=Zb<<2,Zb=q[Yb+16>>2],q[Pb+404>>2]=Xb,q[Pb+400>>2]=Xb,q[Pb+396>>2]=Xb,q[Pb+392>>2]=Xb,q[Pb+388>>2]=Xb,q[Pb+384>>2]=Xb,q[Pb+380>>2]=Xb,q[Pb+376>>2]=Xb,q[Pb+372>>2]=Xb,q[Pb+368>>2]=Xb,q[Pb+364>>2]=Zb<<2,q[Pb+408>>2]=q[Yb+16>>2]<<2,q[Pb+412>>2]=q[Yb+16>>2]<<2,q[Pb+416>>2]=q[Yb+16>>2]<<2,q[Pb+420>>2]=q[Yb+16>>2]<<2,q[Pb+424>>2]=q[Yb+16>>2]<<2,q[Pb+428>>2]=q[Yb+16>>2]<<2,$b=q[a+704>>2],q[Pb+432>>2]=w(q[$b+20>>2],52),q[Pb+436>>2]=ec>>>(Xb=_b=0)<=3?q[$b+20>>2]<<2:0,q[Pb+440>>2]=q[$b+20>>2]<<2,q[Pb+444>>2]=w(q[$b+52>>2],28),1<=(0|(Yb=q[$b+48>>2]))){for(Zb=q[a+1072>>2],ac=0;ac=(bc=q[Zb+(Xb<<2)>>2])+ac|0,_b=(1<>2]=Xb,q[Pb+456>>2]=Xb,q[Pb+452>>2]=_b,q[Pb+448>>2]=w(Yb,36),q[Pb+500>>2]=w(q[$b+72>>2],28),1<=((ac=Xb=Zb=0)|(bc=q[$b+72>>2]))){for(dc=q[a+1224>>2],cc=q[a+1220>>2],gc=q[a+1212>>2],_b=0;_b=(0|(fc=q[(Yb=ac<<2)+cc>>2]-q[Yb+dc>>2]|0))<(0|_b)?_b:1+fc|0,Xb=(0|Xb)<(0|(Yb=q[Yb+gc>>2]))?Yb:Xb,(0|bc)!=(0|(ac=ac+1|0)););ac=Xb<<2,Xb=_b<<2}if(Yb=q[$b+76>>2],q[Pb+516>>2]=Xb,q[Pb+512>>2]=ac,q[Pb+508>>2]=Xb,q[Pb+504>>2]=Yb<<4,1<=(0|(Yb=q[$b+80>>2]))){for(Zb=q[a+1248>>2],ac=q[a+1072>>2],_b=Xb=0;_b=(1<>2]<<2)>>2])+_b|0,(0|Yb)!=(0|(Xb=Xb+1|0)););Zb=_b<<2}if(q[Pb+520>>2]=w(Yb,24),q[Pb+524>>2]=q[$b+80>>2]<<2,Yb=q[$b+80>>2],q[Pb+532>>2]=Zb,q[Pb+528>>2]=Yb<<2,Yb=q[$b+80>>2],q[Pb+544>>2]=Zb,q[Pb+540>>2]=Zb,q[Pb+536>>2]=Yb<<2,Yb=Pb,4<=ec>>>0){if(q[Pb+464>>2]=w(q[$b+120>>2],20),q[Pb+468>>2]=w(q[$b+100>>2],28),Zb=Pb,1<=((Xb=ac=0)|(bc=q[$b+104>>2]))){for(a=q[a+1104>>2],_b=0;_b=q[a+(Xb<<2)>>2]+_b|0,(0|bc)!=(0|(Xb=Xb+1|0)););a=_b<<2}else a=0;q[Zb+476>>2]=a,q[Pb+472>>2]=w(bc,48),q[Pb+484>>2]=w(q[$b+108>>2],12),a=q[$b+112>>2],q[Pb+552>>2]=0,q[Pb+492>>2]=w(a,12),a=0}else{if((0|(ac=q[$b+20>>2]))<1)_b=0;else for(bc=q[a+1060>>2],dc=q[a+952>>2],a=q[a+948>>2],Zb=_b=0;;){if(1<=(0|(cc=q[(Xb=Zb<<2)+dc>>2])))for(cc=(Xb=bc+(q[a+Xb>>2]<<2)|0)+(cc<<2)|0;_b=q[Xb>>2]+_b|0,(Xb=Xb+4|0)>>>0>>0;);if((0|ac)==(0|(Zb=Zb+1|0)))break}q[Pb+552>>2]=ac<<2,ac=q[$b+20>>2]<<2,a=_b<<2}for(q[Yb+556>>2]=a,q[Pb+548>>2]=ac,4>>0&&(q[Pb+480>>2]=w(q[$b+128>>2],12),q[Pb+488>>2]=w(q[$b+132>>2],12),q[Pb+496>>2]=w(q[$b+136>>2],12)),Xb=_b=0;Xb=((Yb=q[(a=(_b<<2)+Pb|0)>>2])+15&-16)+(q[a>>2]=Xb)|0,140!=(0|(_b=_b+1|0)););q[Wb>>2]=Xb}function Ga(a,Pb,Wb,hc){a:{if(!(20>>0||9<(Pb=Pb+-9|0)>>>0)){switch(Pb-1|0){default:return Pb=q[Wb>>2],q[Wb>>2]=Pb+4,q[a>>2]=q[Pb>>2];case 0:return Pb=q[Wb>>2],q[Wb>>2]=Pb+4,Pb=q[Pb>>2],q[a>>2]=Pb,q[a+4>>2]=Pb>>31;case 1:return Pb=q[Wb>>2],q[Wb>>2]=Pb+4,q[a>>2]=q[Pb>>2],q[a+4>>2]=0;case 3:return Pb=q[Wb>>2],q[Wb>>2]=Pb+4,Pb=p[Pb>>1],q[a>>2]=Pb,q[a+4>>2]=Pb>>31;case 4:return Pb=q[Wb>>2],q[Wb>>2]=Pb+4,q[a>>2]=s[Pb>>1],q[a+4>>2]=0;case 5:return Pb=q[Wb>>2],q[Wb>>2]=Pb+4,Pb=o[0|Pb],q[a>>2]=Pb,q[a+4>>2]=Pb>>31;case 6:return Pb=q[Wb>>2],q[Wb>>2]=Pb+4,q[a>>2]=r[0|Pb],q[a+4>>2]=0;case 2:case 7:break a;case 8:}n[hc](a,Wb)}return}Pb=q[Wb>>2]+7&-8,q[Wb>>2]=Pb+8,Wb=q[Pb+4>>2],q[a>>2]=q[Pb>>2],q[a+4>>2]=Wb}function Ha(a){var Pb,hc,Wb=0;if(ha(o[q[a>>2]]))for(;Pb=q[a>>2],hc=o[0|Pb],q[a>>2]=Pb+1,Wb=(w(Wb,10)+hc|0)-48|0,ha(o[Pb+1|0]););return Wb}function Ia(a,ic,jc,kc,lc){var oc,mc;q[204+(L=mc=L-208|0)>>2]=jc,ca(160+mc|(jc=0),0,40),q[200+mc>>2]=q[204+mc>>2],(0|ra(0,ic,200+mc|0,80+mc|0,160+mc|0,kc,lc))<0||(jc=0<=q[a+76>>2]?1:jc,jc=q[a>>2],o[a+74|0]<=0&&(q[a>>2]=-33&jc),oc=32&jc,q[a+48>>2]?ra(a,ic,200+mc|0,80+mc|0,160+mc|0,kc,lc):(q[a+48>>2]=80,q[a+16>>2]=80+mc,q[a+28>>2]=mc,q[a+20>>2]=mc,jc=q[a+44>>2],ra(a,ic,200+(q[a+44>>2]=mc)|0,80+mc|0,160+mc|0,kc,lc),jc&&(n[q[a+36>>2]](a,0,0),q[a+48>>2]=0,q[a+44>>2]=jc,q[a+28>>2]=0,q[a+16>>2]=0,q[a+20>>2]=0)),q[a>>2]=q[a>>2]|oc),L=208+mc|0}function Ka(a,ic,pc){var rc,qc;$(8+(L=qc=L-160|0)|0,3192,144),q[52+qc>>2]=a,q[28+qc>>2]=a,q[56+qc>>2]=rc=(rc=-2-a|0)>>>0<256?rc:256,q[36+qc>>2]=a=a+rc|0,q[24+qc>>2]=a,Ia(8+qc|0,ic,pc,11,12),rc&&(a=q[28+qc>>2],o[a-((0|a)==q[24+qc>>2])|0]=0),L=160+qc|0}function La(a,ic){var sc,tc,pc=0,pc=0!=(0|ic);a:{b:{c:{d:if(!(!ic|!(3&a)))for(;;){if(!r[0|a])break c;if(a=a+1|0,pc=0!=(0|(ic=ic+-1|0)),!ic)break d;if(!(3&a))break}if(!pc)break b}if(!r[0|a])break a;e:{if(4<=ic>>>0){for(pc=(pc=ic+-4|0)-(sc=-4&pc)|0,sc=4+(a+sc|0)|0;;){if((-1^(tc=q[a>>2]))&tc+-16843009&-2139062144)break e;if(a=a+4|0,!(3<(ic=ic+-4|0)>>>0))break}ic=pc,a=sc}if(!ic)break b}for(;;){if(!r[0|a])break a;if(a=a+1|0,!(ic=ic+-1|0))break}}return 0}return a}function Ma(a){var uc,ic=0;if(!a)return 32;if(!(1&a))for(;ic=ic+1|0,uc=2&a,a>>>=1,!uc;);return ic}function Na(a,vc){var zc,Ac,Bc,yc,wc=0,xc=0,xc=4;L=yc=L-256|0;a:if(!((0|vc)<2))for(wc=q[(Bc=(vc<<2)+a|0)>>2]=yc;;){for($(wc,q[a>>2],zc=xc>>>0<256?xc:256),wc=0;$(q[(Ac=(wc<<2)+a|0)>>2],q[((wc=wc+1|0)<<2)+a>>2],zc),q[Ac>>2]=q[Ac>>2]+zc,(0|vc)!=(0|wc););if(!(xc=xc-zc|0))break a;wc=q[Bc>>2]}L=256+yc|0}function Oa(a){return Ma(q[a>>2]+-1|0)||((a=Ma(q[a+4>>2]))?a+32|0:0)}function _c(a,$o){$o|=0,b[0]=a|=0,b[1]=$o}function bd(a,$o,ap){return function(a,$o,ap){var ep,cp,bp,dp,fp=w(cp=ap>>>16,bp=a>>>16);return a=(65535&(bp=((ep=w(dp=65535&ap,a&=65535))>>>16)+w(bp,dp)|0))+w(a,cp)|0,M=((fp+w($o,ap)|0)+(bp>>>16)|0)+(a>>>16)|0,65535&ep|a<<16}(a,$o,ap)}function cd(a,$o,ap){return function(a,$o,ap){var np,mp,gp=0,hp=0,ip=0,jp=0,kp=0,lp=0,op=0;a:{b:{c:{d:{e:{if(!(hp=$o))return _c(($o=a)-w(a=(a>>>0)/(ap>>>0)|0,ap)|0,0),M=0,a;if(gp=ap){if(!((jp=gp+-1|0)&gp))break e;kp=0-(jp=(z(gp)+33|0)-z(hp)|0)|0;break c}if(!a)return _c(0,hp-w(a=(hp>>>0)/0|0,0)|0),M=0,a;if((gp=32-z(hp)|0)>>>0<31)break d;break b}if(_c(a&jp,0),1==(0|gp))break a;return ap=31&(gp=gp?31-z(gp+-1^gp)|0:32),a=32<=(63&gp)>>>0?(hp=0,$o>>>ap):(hp=$o>>>ap,((1<>>ap),M=hp,a}jp=gp+1|0,kp=63-gp|0}if(gp=$o,ip=31&(hp=63&jp),ip=32<=hp>>>0?(hp=0,gp>>>ip):(hp=gp>>>ip,((1<>>ip),gp=31&(kp&=63),32<=kp>>>0?($o=a<>>32-gp|$o<>>0<4294967295&&(gp=0);ip=(mp=lp=ip<<1|$o>>>31)-(np=ap&(lp=gp-((hp=hp<<1|ip>>>31)+(kp>>>0>>0)|0)>>31))|0,hp=hp-(mp>>>0>>0)|0,$o=$o<<1|a>>>31,a=op|a<<1,op=lp&=1,jp=jp+-1|0;);return _c(ip,hp),M=$o<<1|a>>>31,lp|a<<1}_c(a,$o),$o=a=0}return M=$o,a}(a,$o,ap)}function ed(a){var pp;return(-1>>>(pp=31&a)&-2)<>>a}function N(){return buffer.byteLength/65536|0}}(H,I,J)}}l=null,b.wasmBinary&&(F=b.wasmBinary);var WebAssembly={},F=[];"object"!=typeof WebAssembly&&E("no native wasm support detected");var I,J=new function(a){var c=Array(16);return c.grow=function(){17<=c.length&&B("Unable to grow wasm table. Use a higher value for RESERVED_FUNCTION_POINTERS or set ALLOW_TABLE_GROWTH."),c.push(null)},c.set=function(a,e){c[a]=e},c.get=function(a){return c[a]},c},K=!1;function assert(a,c){a||B("Assertion failed: "+c)}var buffer,M,L,N,ha="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function ia(a,c,d){var e=c+d;for(d=c;a[d]&&!(e<=d);)++d;if(16>10,56320|1023&f)))):e+=String.fromCharCode(f)}return e}function ja(a,c){return a?ia(L,a,c):""}function ka(a){return 0>>16)*e+d*(c>>>16)<<16)|0}),Math.fround||(ra=new Float32Array(1),Math.fround=function(a){return ra[0]=a,ra[0]}),Math.clz32||(Math.clz32=function(a){var c=32,d=a>>16;return d&&(c-=16,a=d),(d=a>>8)&&(c-=8,a=d),(d=a>>4)&&(c-=4,a=d),(d=a>>2)&&(c-=2,a=d),a>>1?c-2:c-a}),Math.trunc||(Math.trunc=function(a){return a<0?Math.ceil(a):Math.floor(a)}),0),Q=null,U=null;function B(a){throw b.onAbort&&b.onAbort(a),D(a),E(a),K=!0,"abort("+a+"). Build with -s ASSERTIONS=1 for more info."}b.preloadedImages={},b.preloadedAudios={};var V="data:application/octet-stream;base64,";function W(a){return String.prototype.startsWith?a.startsWith(V):0===a.indexOf(V)}var X="_em_module.wasm";function ta(){try{if(F)return new Uint8Array(F);var a=z(X);if(a)return a;if(w)return w(X);throw"both async and sync fetching of the wasm failed"}catch(c){B(c)}}W(X)||(t=X,X=b.locateFile?b.locateFile(t,u):u+t),na.push({ea:function(){va()}});var wa=[null,[],[]],xa=!1;function C(a){for(var c=[],d=0;d>4,f=(15&f)<<4|g>>2,h=(3&g)<<6|m}while(c+=String.fromCharCode(e),64!==g&&(c+=String.fromCharCode(f)),64!==m&&(c+=String.fromCharCode(h)),d>16),la(I.buffer);var d=1;break a}catch(e){}d=void 0}return!!d},c:function(a,c,d,e){try{for(var f=0,g=0;g>2],h=N[c+(8*g+4)>>2],A=0;A>2]=f,0}catch(T){return"undefined"!=typeof FS&&T instanceof FS.fa||B(T),T.ga}},memory:I,table:J},u=function(){function a(a){b.asm=a.exports,P--,b.monitorRunDependencies&&b.monitorRunDependencies(P),0==P&&(null!==Q&&(clearInterval(Q),Q=null),U)&&(a=U,U=null,a())}function c(c){a(c.instance)}function d(a){(F||!p&&!q||"function"!=typeof fetch?new Promise(function(a){a(ta())}):fetch(X,{credentials:"same-origin"}).then(function(a){if(a.ok)return a.arrayBuffer();throw"failed to load wasm binary file at '"+X+"'"}).catch(ta)).then(function(){return{then:function(a){a({instance:new da})}}}).then(a,function(a){E("failed to asynchronously prepare wasm: "+a),B(a)})}var e={env:H,wasi_unstable:H};if(P++,b.monitorRunDependencies&&b.monitorRunDependencies(P),b.instantiateWasm)try{return b.instantiateWasm(e,a)}catch(f){return E("Module.instantiateWasm callback failed with error: "+f),!1}return F||"function"!=typeof WebAssembly.instantiateStreaming||W(X)||"function"!=typeof fetch?d(c):fetch(X,{credentials:"same-origin"}).then(function(a){return WebAssembly.instantiateStreaming(a,e).then(c,function(a){E("wasm streaming compile failed: "+a),E("falling back to ArrayBuffer instantiation"),d(c)})}),{}}(),va=(b.asm=u,b.___wasm_call_ctors=function(){return b.asm.d.apply(null,arguments)}),Aa=(b._csmGetLogFunction=function(){return b.asm.e.apply(null,arguments)},b._csmGetVersion=function(){return b.asm.f.apply(null,arguments)},b._csmGetLatestMocVersion=function(){return b.asm.g.apply(null,arguments)},b._csmGetMocVersion=function(){return b.asm.h.apply(null,arguments)},b._csmHasMocConsistency=function(){return b.asm.i.apply(null,arguments)},b._csmSetLogFunction=function(){return b.asm.j.apply(null,arguments)},b._csmReviveMocInPlace=function(){return b.asm.k.apply(null,arguments)},b._csmReadCanvasInfo=function(){return b.asm.l.apply(null,arguments)},b._csmGetSizeofModel=function(){return b.asm.m.apply(null,arguments)},b._csmInitializeModelInPlace=function(){return b.asm.n.apply(null,arguments)},b._csmUpdateModel=function(){return b.asm.o.apply(null,arguments)},b._csmGetParameterCount=function(){return b.asm.p.apply(null,arguments)},b._csmGetParameterIds=function(){return b.asm.q.apply(null,arguments)},b._csmGetParameterTypes=function(){return b.asm.r.apply(null,arguments)},b._csmGetParameterMinimumValues=function(){return b.asm.s.apply(null,arguments)},b._csmGetParameterMaximumValues=function(){return b.asm.t.apply(null,arguments)},b._csmGetParameterDefaultValues=function(){return b.asm.u.apply(null,arguments)},b._csmGetParameterValues=function(){return b.asm.v.apply(null,arguments)},b._csmGetPartCount=function(){return b.asm.w.apply(null,arguments)},b._csmGetPartIds=function(){return b.asm.x.apply(null,arguments)},b._csmGetPartOpacities=function(){return b.asm.y.apply(null,arguments)},b._csmGetPartParentPartIndices=function(){return b.asm.z.apply(null,arguments)},b._csmGetDrawableCount=function(){return b.asm.A.apply(null,arguments)},b._csmGetDrawableIds=function(){return b.asm.B.apply(null,arguments)},b._csmGetDrawableConstantFlags=function(){return b.asm.C.apply(null,arguments)},b._csmGetDrawableDynamicFlags=function(){return b.asm.D.apply(null,arguments)},b._csmGetDrawableTextureIndices=function(){return b.asm.E.apply(null,arguments)},b._csmGetDrawableDrawOrders=function(){return b.asm.F.apply(null,arguments)},b._csmGetDrawableRenderOrders=function(){return b.asm.G.apply(null,arguments)},b._csmGetDrawableOpacities=function(){return b.asm.H.apply(null,arguments)},b._csmGetDrawableMaskCounts=function(){return b.asm.I.apply(null,arguments)},b._csmGetDrawableMasks=function(){return b.asm.J.apply(null,arguments)},b._csmGetDrawableVertexCounts=function(){return b.asm.K.apply(null,arguments)},b._csmGetDrawableVertexPositions=function(){return b.asm.L.apply(null,arguments)},b._csmGetDrawableVertexUvs=function(){return b.asm.M.apply(null,arguments)},b._csmGetDrawableIndexCounts=function(){return b.asm.N.apply(null,arguments)},b._csmGetDrawableIndices=function(){return b.asm.O.apply(null,arguments)},b._csmGetDrawableMultiplyColors=function(){return b.asm.P.apply(null,arguments)},b._csmGetDrawableScreenColors=function(){return b.asm.Q.apply(null,arguments)},b._csmGetDrawableParentPartIndices=function(){return b.asm.R.apply(null,arguments)},b._csmResetDrawableDynamicFlags=function(){return b.asm.S.apply(null,arguments)},b._csmGetParameterKeyCounts=function(){return b.asm.T.apply(null,arguments)},b._csmGetParameterKeyValues=function(){return b.asm.U.apply(null,arguments)},b._csmMallocMoc=function(){return b.asm.V.apply(null,arguments)},b._csmMallocModelAndInitialize=function(){return b.asm.W.apply(null,arguments)},b._csmMalloc=function(){return b.asm.X.apply(null,arguments)},b._csmFree=function(){return b.asm.Y.apply(null,arguments)},b._csmInitializeAmountOfMemory=function(){return b.asm.Z.apply(null,arguments)},b.stackSave=function(){return b.asm._.apply(null,arguments)}),Ba=b.stackAlloc=function(){return b.asm.$.apply(null,arguments)},Ca=b.stackRestore=function(){return b.asm.aa.apply(null,arguments)},ca=b.__growWasmMemory=function(){return b.asm.ba.apply(null,arguments)};function Z(){function a(){if(!Y&&(Y=!0,!K)){if(O(na),O(oa),b.onRuntimeInitialized&&b.onRuntimeInitialized(),b.postRun)for("function"==typeof b.postRun&&(b.postRun=[b.postRun]);b.postRun.length;){var a=b.postRun.shift();pa.unshift(a)}O(pa)}}if(!(0>6}else{if(k<=65535){if(d<=e+2)break;f[e++]=224|k>>12}else{if(d<=e+3)break;f[e++]=240|k>>18,f[e++]=128|k>>12&63}f[e++]=128|k>>6&63}f[e++]=128|63&k}}f[e]=0}}return c},array:function(a){var c=Ba(a.length);return M.set(a,c),c}},g=function(a){var c=b["_"+a];return assert(c,"Cannot call unknown function "+a+", make sure it is exported"),c}(a),m=[];if(a=0,e)for(var h=0;h { + console.log( + `[Status] Live2D 模型 ${modelId}-${modelTexturesId} 加载完成` + ); + }, + } ); + this.#app.stage.addChild(model); + + model.scale.set(0.25); } /** @@ -74,8 +97,9 @@ class Model { const modelId = Number(localStorage.getItem("modelId")); const modelTexturesId = Number(localStorage.getItem("modelTexturesId")); // 可选 "rand"(随机), "switch"(顺序) - const result = await fetch(`${this.#apiPath}rand_textures/?id=${modelId}-${modelTexturesId}`) - .then((response) => response.json()) as ModelTexturesResult; + const result = (await fetch( + `${this.#apiPath}rand_textures/?id=${modelId}-${modelTexturesId}` + ).then((response) => response.json())) as ModelTexturesResult; const texturesId = result.textures.id; if (texturesId === 1 && (modelTexturesId === 1 || modelTexturesId === 0)) { sendMessage("我还没有其他衣服呢!", 4000, 3); @@ -89,10 +113,11 @@ class Model { */ async loadOtherModel() { const modelId = Number(localStorage.getItem("modelId")); - const result = await fetch(`${this.#apiPath}switch/?id=${modelId}`) - .then((response) => response.json()) as ModelResult; + const result = (await fetch(`${this.#apiPath}switch/?id=${modelId}`).then( + (response) => response.json() + )) as ModelResult; this.loadModel(result.model.id, 0, result.model.message); } } -export default Model; \ No newline at end of file +export default Model; diff --git a/packages/live2d/tsconfig.json b/packages/live2d/tsconfig.json index 29206d7..188fc7e 100644 --- a/packages/live2d/tsconfig.json +++ b/packages/live2d/tsconfig.json @@ -27,5 +27,6 @@ } ] }, - "include": ["src/**/*"] + "include": ["src/**/*"], + "exclude": ["node_modules", "dist", "src/libs/**/*"] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9acb9aa..e44fde5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -23,9 +23,18 @@ importers: '@lit/react': specifier: ^1.0.7 version: 1.0.7(@types/react@19.0.8) + iconify-icon: + specifier: ^2.3.0 + version: 2.3.0 lit: specifier: ^3.2.1 version: 3.2.1 + pixi-live2d-display: + specifier: ^0.4.0 + version: 0.4.0(76g3zz2nt7dtjnktvdvk76m2oe) + pixi.js: + specifier: ^6.5.2 + version: 6.5.10 query-string: specifier: ^9.1.1 version: 9.1.1 @@ -553,6 +562,267 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} + '@pixi/accessibility@6.5.10': + resolution: {integrity: sha512-URrI1H+1kjjHSyhY1QXcUZ8S3omdVTrXg5y0gndtpOhIelErBTC9NWjJfw6s0Rlmv5+x5VAitQTgw9mRiatDgw==} + peerDependencies: + '@pixi/core': 6.5.10 + '@pixi/display': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/app@6.5.10': + resolution: {integrity: sha512-VsNHLajZ5Dbc/Zrj7iWmIl3eu6Fec+afjW/NXXezD8Sp3nTDF0bv5F+GDgN/zSc2gqIvPHyundImT7hQGBDghg==} + peerDependencies: + '@pixi/core': 6.5.10 + '@pixi/display': 6.5.10 + '@pixi/math': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/compressed-textures@6.5.10': + resolution: {integrity: sha512-41NT5mkfam47DrkB8xMp3HUZDt7139JMB6rVNOmb3u2vm+2mdy9tzi5s9nN7bG9xgXlchxcFzytTURk+jwXVJA==} + peerDependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10 + '@pixi/loaders': 6.5.10 + '@pixi/settings': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/constants@6.5.10': + resolution: {integrity: sha512-PUF2Y9YISRu5eVrVVHhHCWpc/KmxQTg3UH8rIUs8UI9dCK41/wsPd3pEahzf7H47v7x1HCohVZcFO3XQc1bUDw==} + + '@pixi/core@6.5.10': + resolution: {integrity: sha512-Gdzp5ENypyglvsh5Gv3teUZnZnmizo4xOsL+QqmWALdFlJXJwLJMVhKVThV/q/095XR6i4Ou54oshn+m4EkuFw==} + peerDependencies: + '@pixi/constants': 6.5.10 + '@pixi/extensions': 6.5.10 + '@pixi/math': 6.5.10 + '@pixi/runner': 6.5.10 + '@pixi/settings': 6.5.10 + '@pixi/ticker': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/display@6.5.10': + resolution: {integrity: sha512-NxFdDDxlbH5fQkzGHraLGoTMucW9pVgXqQm13TSmkA3NWIi/SItHL4qT2SI8nmclT9Vid1VDEBCJFAbdeuQw1Q==} + peerDependencies: + '@pixi/constants': 6.5.10 + '@pixi/math': 6.5.10 + '@pixi/settings': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/extensions@6.5.10': + resolution: {integrity: sha512-EIUGza+E+sCy3dupuIjvRK/WyVyfSzHb5XsxRaxNrPwvG1iIUIqNqZ3owLYCo4h17fJWrj/yXVufNNtUKQccWQ==} + + '@pixi/extract@6.5.10': + resolution: {integrity: sha512-hXFIc4EGs14GFfXAjT1+6mzopzCMWeXeai38/Yod3vuBXkkp8+ksen6kE09vTnB9l1IpcIaCM+XZEokuqoGX2A==} + peerDependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10 + '@pixi/math': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/filter-alpha@6.5.10': + resolution: {integrity: sha512-GWHLJvY0QOIDRjVx0hdUff6nl/PePQg84i8XXPmANrvA+gJ/eSRTQRmQcdgInQfawENADB/oRqpcCct6IAcKpQ==} + peerDependencies: + '@pixi/core': 6.5.10 + + '@pixi/filter-blur@6.5.10': + resolution: {integrity: sha512-LJsRocVOdM9hTzZKjP+jmkfoL1nrJi5XpR0ItgRN8fflOC7A7Ln4iPe7nukbbq3H7QhZSunbygMubbO6xhThZw==} + peerDependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10 + '@pixi/settings': 6.5.10 + + '@pixi/filter-color-matrix@6.5.10': + resolution: {integrity: sha512-C2S44/EoWTrhqedLWOZTq9GZV5loEq1+MhyK9AUzEubWGMHhou1Juhn2mRZ7R6flKPCRQNKrXpStUwCAouud3Q==} + peerDependencies: + '@pixi/core': 6.5.10 + + '@pixi/filter-displacement@6.5.10': + resolution: {integrity: sha512-fbblMYyPX/hO3Tpoaa4tOBYxqp4TxjNrz6xyt15tKSVxWQElk+Tx98GJ+aaBoiHOKt8ezzHplStWoHG++JIv/w==} + peerDependencies: + '@pixi/core': 6.5.10 + '@pixi/math': 6.5.10 + + '@pixi/filter-fxaa@6.5.10': + resolution: {integrity: sha512-wbHL9UtY3g7jTyvO8JaZks6DqV8AO5c96Hfu0zfndWBPs79Ul6/sq3LD2eE+yq5vK5T2R9Sr4s54ls1JT3Sppg==} + peerDependencies: + '@pixi/core': 6.5.10 + + '@pixi/filter-noise@6.5.10': + resolution: {integrity: sha512-CX+/06NVaw3HsjipZVb7aemkca0TC8I6qfKI4lx2ugxS/6G6zkY5zqd8+nVSXW4DpUXB6eT0emwfRv6N00NvuA==} + peerDependencies: + '@pixi/core': 6.5.10 + + '@pixi/graphics@6.5.10': + resolution: {integrity: sha512-KPHGJ910fi8bRQQ+VcTIgrK+bKIm8yAQaZKPqMtm14HzHPGcES6HkgeNY1sd7m8J4aS9btm5wOSyFu0p5IzTpA==} + peerDependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10 + '@pixi/display': 6.5.10 + '@pixi/math': 6.5.10 + '@pixi/sprite': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/interaction@6.5.10': + resolution: {integrity: sha512-v809pJmXA2B9dV/vdrDMUqJT+fBB/ARZli2YRmI2dPbEbkaYr8FNmxCAJnwT8o+ymTx044Ie820hn9tVrtMtfA==} + peerDependencies: + '@pixi/core': 6.5.10 + '@pixi/display': 6.5.10 + '@pixi/math': 6.5.10 + '@pixi/ticker': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/loaders@6.5.10': + resolution: {integrity: sha512-AuK7mXBmyVsDFL9DDFPB8sqP8fwQ2NOktvu98bQuJl0/p/UeK/0OAQnF3wcf3FeBv5YGXfNHL21c2DCisjKfTg==} + peerDependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/math@6.5.10': + resolution: {integrity: sha512-fxeu7ykVbMGxGV2S3qRTupHToeo1hdWBm8ihyURn3BMqJZe2SkZEECPd5RyvIuuNUtjRnmhkZRnF3Jsz2S+L0g==} + + '@pixi/mesh-extras@6.5.10': + resolution: {integrity: sha512-UCG7OOPPFeikrX09haCibCMR0jPQ4UJ+4HiYiAv/3dahq5eEzBx+yAwVtxcVCjonkTf/lu5SzmHdzpsbHLx5aw==} + peerDependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10 + '@pixi/math': 6.5.10 + '@pixi/mesh': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/mesh@6.5.10': + resolution: {integrity: sha512-tUNPsdp5/t/yRsCmfxIcufIfbQVzgAlMNgQ1igWOkSxzhB7vlEbZ8ZLLW5tQcNyM/r7Nhjz+RoB+RD+/BCtvlA==} + peerDependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10 + '@pixi/display': 6.5.10 + '@pixi/math': 6.5.10 + '@pixi/settings': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/mixin-cache-as-bitmap@6.5.10': + resolution: {integrity: sha512-HV4qPZt8R7uuPZf1XE5S0e3jbN4+/EqgAIkueIyK3Em+0IO1rCmIbzzYxFPxkElMUu5VvN1r4hXK846z9ITnhw==} + peerDependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10 + '@pixi/display': 6.5.10 + '@pixi/math': 6.5.10 + '@pixi/settings': 6.5.10 + '@pixi/sprite': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/mixin-get-child-by-name@6.5.10': + resolution: {integrity: sha512-YYd9wjnI/4aKY0H5Ij413UppVZn3YE1No2CZrNevV6WbhylsJucowY3hJihtl9mxkpwtaUIyWMjmphkbOinbzA==} + peerDependencies: + '@pixi/display': 6.5.10 + + '@pixi/mixin-get-global-position@6.5.10': + resolution: {integrity: sha512-A83gTZP9CdQAyrAvOZl1P707Q0QvIC0V8UnBAMd4GxuhMOXJtXVPCdmfPVXUrfoywgnH+/Bgimq5xhsXTf8Hzg==} + peerDependencies: + '@pixi/display': 6.5.10 + '@pixi/math': 6.5.10 + + '@pixi/particle-container@6.5.10': + resolution: {integrity: sha512-CCNAdYGzKoOc3FtK2kyWCNjygdHppeOEqqK189yhg3yRSsvby+HMms/cM6bLK/4Vf6mFoAy1na3w/oXpqTR2Ag==} + peerDependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10 + '@pixi/display': 6.5.10 + '@pixi/math': 6.5.10 + '@pixi/sprite': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/polyfill@6.5.10': + resolution: {integrity: sha512-KDTWyr285VvPM8GGTVIZAhmxGrOlTznUGK/9kWS3GtrogwLWn41S/86Yej1gYvotVyUomCcOok33Jzahb+vX1w==} + + '@pixi/prepare@6.5.10': + resolution: {integrity: sha512-PHMApz/GPg7IX/7+2S98criN2+Mp+fgiKpojV9cnl0SlW2zMxfAHBBi8zik9rHBgjx8X6d6bR0MG1rPtb6vSxQ==} + peerDependencies: + '@pixi/core': 6.5.10 + '@pixi/display': 6.5.10 + '@pixi/graphics': 6.5.10 + '@pixi/settings': 6.5.10 + '@pixi/text': 6.5.10 + '@pixi/ticker': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/runner@6.5.10': + resolution: {integrity: sha512-4HiHp6diCmigJT/DSbnqQP62OfWKmZB7zPWMdV1AEdr4YT1QxzXAW1wHg7dkoEfyTHqZKl0tm/zcqKq/iH7tMA==} + + '@pixi/settings@6.5.10': + resolution: {integrity: sha512-ypAS5L7pQ2Qb88yQK72bXtc7sD8OrtLWNXdZ/gnw5kwSWCFaOSoqhKqJCXrR5DQtN98+RQefwbEAmMvqobhFyw==} + peerDependencies: + '@pixi/constants': 6.5.10 + + '@pixi/sprite-animated@6.5.10': + resolution: {integrity: sha512-x1kayucAqpVbNk+j+diC/7sQGQsAl6NCH1J2/EEaiQjlV3GOx1MXS9Tft1N1Y1y7otbg1XsnBd60/Yzcp05pxA==} + peerDependencies: + '@pixi/core': 6.5.10 + '@pixi/sprite': 6.5.10 + '@pixi/ticker': 6.5.10 + + '@pixi/sprite-tiling@6.5.10': + resolution: {integrity: sha512-lDFcPuwExrdJhli+WmjPivChjeCG6NiRl36iQ8n2zVi/MYVv9qfKCA6IdU7HBWk1AZdsg6KUTpwfmVLUI+qz3w==} + peerDependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10 + '@pixi/display': 6.5.10 + '@pixi/math': 6.5.10 + '@pixi/sprite': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/sprite@6.5.10': + resolution: {integrity: sha512-UiK+8LgM9XQ/SBDKjRgZ8WggdOSlFRXqiWjEZVmNkiyU8HvXeFzWPRhpc8RR1zDwAUhZWKtMhF8X/ba9m+z2lg==} + peerDependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10 + '@pixi/display': 6.5.10 + '@pixi/math': 6.5.10 + '@pixi/settings': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/spritesheet@6.5.10': + resolution: {integrity: sha512-7uOZ1cYyYtPb0ZEgXV1SZ8ujtluZNY0TL5z3+Qc8cgGGZK/MaWG7N6Wf+uR4BR2x8FLNwcyN5IjbQDKCpblrmg==} + peerDependencies: + '@pixi/core': 6.5.10 + '@pixi/loaders': 6.5.10 + '@pixi/math': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/text-bitmap@6.5.10': + resolution: {integrity: sha512-g/iFIMGp6Pfi0BvX6Ykp48Z6JXVgKOrc7UCIR9CM21wYcCiQGqtdFwstV236xk6/D8NToUtSOcifhtQ28dVTdQ==} + peerDependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10 + '@pixi/display': 6.5.10 + '@pixi/loaders': 6.5.10 + '@pixi/math': 6.5.10 + '@pixi/mesh': 6.5.10 + '@pixi/settings': 6.5.10 + '@pixi/text': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/text@6.5.10': + resolution: {integrity: sha512-ikwkonLJ+6QmEVW8Ji9fS5CjrKNbU4mHzYuwRQas/VJQuSWgd0myCcaw6ZbF1oSfQe70HgbNOR0sH8Q3Com0qg==} + peerDependencies: + '@pixi/core': 6.5.10 + '@pixi/math': 6.5.10 + '@pixi/settings': 6.5.10 + '@pixi/sprite': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/ticker@6.5.10': + resolution: {integrity: sha512-UqX1XYtzqFSirmTOy8QAK4Ccg4KkIZztrBdRPKwFSOEiKAJoGDCSBmyQBo/9aYQKGObbNnrJ7Hxv3/ucg3/1GA==} + peerDependencies: + '@pixi/extensions': 6.5.10 + '@pixi/settings': 6.5.10 + + '@pixi/utils@6.5.10': + resolution: {integrity: sha512-4f4qDMmAz9IoSAe08G2LAxUcEtG9jSdudfsMQT2MG+OpfToirboE6cNoO0KnLCvLzDVE/mfisiQ9uJbVA9Ssdw==} + peerDependencies: + '@pixi/constants': 6.5.10 + '@pixi/settings': 6.5.10 + '@polka/url@1.0.0-next.28': resolution: {integrity: sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==} @@ -672,12 +942,18 @@ packages: '@types/babel__traverse@7.20.6': resolution: {integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==} + '@types/earcut@2.1.4': + resolution: {integrity: sha512-qp3m9PPz4gULB9MhjGID7wpo3gJ4bTGXm7ltNDsmOvsPduTeHp8wSW9YckBj3mljeOh4F0m2z/0JKAALRKbmLQ==} + '@types/estree@1.0.6': resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} '@types/node@22.13.1': resolution: {integrity: sha512-jK8uzQlrvXqEU91UxiK5J7pKHyzgnI1Qnl0QDHIgVGuolJhRb9EEl28Cj9b3rGR8B2lhFCtvIm5os8lFnO/1Ew==} + '@types/offscreencanvas@2019.7.3': + resolution: {integrity: sha512-ieXiYmgSRXUDeOntE1InxjWyvEelZGP63M+cGuquuRLuIKKT1osnkXjxev9B7d1nXSug5vpunx+gNlbVxMlC9A==} + '@types/react-dom@19.0.3': resolution: {integrity: sha512-0Knk+HJiMP/qOZgMyNFamlIjw9OFCsyC2ZbigmEEyXXixgre6IQpm/4V+r3qH4GC1JPvRJKInw+on2rV6YZLeA==} peerDependencies: @@ -833,10 +1109,27 @@ packages: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} + array-union@1.0.2: + resolution: {integrity: sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==} + engines: {node: '>=0.10.0'} + + array-uniq@1.0.3: + resolution: {integrity: sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==} + engines: {node: '>=0.10.0'} + + async@2.6.4: + resolution: {integrity: sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==} + + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + binary-extensions@2.3.0: resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} engines: {node: '>=8'} + brace-expansion@1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + braces@3.0.3: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} @@ -859,6 +1152,14 @@ packages: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} + call-bind-apply-helpers@1.0.2: + resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} + engines: {node: '>= 0.4'} + + call-bound@1.0.3: + resolution: {integrity: sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==} + engines: {node: '>= 0.4'} + caniuse-lite@1.0.30001697: resolution: {integrity: sha512-GwNPlWJin8E+d7Gxq96jxM6w0w+VFeyyXRsjU58emtkYqnbwHqXm5uT2uCmO0RQE9htWknOP4xtBlLmM/gWxvQ==} @@ -893,6 +1194,12 @@ packages: commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} + commondir@1.0.1: + resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} + + concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + confbox@0.1.8: resolution: {integrity: sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==} @@ -933,12 +1240,22 @@ packages: resolution: {integrity: sha512-qTBmfQoXvhKO75D/05C8m+fteQmn4U46FWYiLhXtZQInzitXLWY0EQ/2oKnpAz9g2lQWW8jYcLcT+hPJGT+kig==} engines: {node: '>=10.13'} + dunder-proto@1.0.1: + resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} + engines: {node: '>= 0.4'} + duplexer@0.1.2: resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} + earcut@2.2.4: + resolution: {integrity: sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ==} + electron-to-chromium@1.5.93: resolution: {integrity: sha512-M+29jTcfNNoR9NV7la4SwUqzWAxEwnc7ThA5e1m6LRSotmpfpCpLcIfgtSCVL+MllNLgAyM/5ru86iMRemPzDQ==} + email-addresses@3.1.0: + resolution: {integrity: sha512-k0/r7GrWVL32kZlGwfPNgB2Y/mMXVTq/decgLczm/j34whdaspNrZO8CnXPf1laaHxI6ptUlsnAxN+UAPw+fzg==} + emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -946,6 +1263,18 @@ packages: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} + es-define-property@1.0.1: + resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} + engines: {node: '>= 0.4'} + + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + + es-object-atoms@1.1.1: + resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} + engines: {node: '>= 0.4'} + esbuild@0.23.1: resolution: {integrity: sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==} engines: {node: '>=18'} @@ -967,6 +1296,9 @@ packages: estree-walker@2.0.2: resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + eventemitter3@3.1.2: + resolution: {integrity: sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==} + fast-glob@3.3.3: resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==} engines: {node: '>=8.6.0'} @@ -982,6 +1314,14 @@ packages: picomatch: optional: true + filename-reserved-regex@2.0.0: + resolution: {integrity: sha512-lc1bnsSr4L4Bdif8Xb/qrtokGbq5zlsms/CYH8PP+WtCkGNF65DPiQY8vG3SakEdRn8Dlnm+gW/qWKKjS5sZzQ==} + engines: {node: '>=4'} + + filenamify@4.3.0: + resolution: {integrity: sha512-hcFKyUG57yWGAzu1CMt/dPzYZuv+jAJUT85bL8mrXvNe6hWj6yEHEc4EdcgiA6Z3oi1/9wXJdZPXF2dZNgwgOg==} + engines: {node: '>=8'} + fill-range@7.1.1: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} @@ -990,11 +1330,29 @@ packages: resolution: {integrity: sha512-qWeTREPoT7I0bifpPUXtxkZJ1XJzxWtfoWWkdVGqa+eCr3SHW/Ocp89o8vLvbUuQnadybJpjOKu4V+RwO6sGng==} engines: {node: '>=14.16'} + find-cache-dir@3.3.2: + resolution: {integrity: sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==} + engines: {node: '>=8'} + + find-up@4.1.0: + resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} + engines: {node: '>=8'} + + fs-extra@8.1.0: + resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} + engines: {node: '>=6 <7 || >=8'} + + fs.realpath@1.0.0: + resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + gensync@1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} @@ -1003,13 +1361,30 @@ packages: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} + get-intrinsic@1.3.0: + resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} + engines: {node: '>= 0.4'} + + get-proto@1.0.1: + resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} + engines: {node: '>= 0.4'} + get-tsconfig@4.10.0: resolution: {integrity: sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A==} + gh-pages@4.0.0: + resolution: {integrity: sha512-p8S0T3aGJc68MtwOcZusul5qPSNZCalap3NWbhRUZYu1YOdp+EjZ+4kPmRM8h3NNRdqw00yuevRjlkuSzCn7iQ==} + engines: {node: '>=10'} + hasBin: true + glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} + glob@7.2.3: + resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + deprecated: Glob versions prior to v9 are no longer supported + globals@11.12.0: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} @@ -1018,6 +1393,17 @@ packages: resolution: {integrity: sha512-OkToC372DtlQeje9/zHIo5CT8lRP/FUgEOKBEhU4e0abL7J7CD24fD9ohiLN5hagG/kWCYj4K5oaxxtj2Z0Dig==} engines: {node: '>=18'} + globby@6.1.0: + resolution: {integrity: sha512-KVbFv2TQtbzCoxAnfD6JcHZTYCzyliEaaeM/gH8qQdkKr5s0OP9scEgvdcngyk7AVdY6YVW/TJHd+lQ/Df3Daw==} + engines: {node: '>=0.10.0'} + + gopd@1.2.0: + resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} + engines: {node: '>= 0.4'} + + graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + gzip-size@6.0.0: resolution: {integrity: sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==} engines: {node: '>=10'} @@ -1026,9 +1412,27 @@ packages: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} + has-symbols@1.1.0: + resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} + engines: {node: '>= 0.4'} + + hasown@2.0.2: + resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} + engines: {node: '>= 0.4'} + + iconify-icon@2.3.0: + resolution: {integrity: sha512-C0beI9oTDxQz6voI5CKl7MiJf0Lw4UU8K4G4t6pcUDClLmCvuMOpcvd8MAztQ2SfoH0iv7WHdxBFjekKPFKH2Q==} + importx@0.5.1: resolution: {integrity: sha512-YrRaigAec1sC2CdIJjf/hCH1Wp9Ii8Cq5ROw4k5nJ19FVl2FcJUHZ5gGIb1vs8+JNYIyOJpc2fcufS2330bxDw==} + inflight@1.0.6: + resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. + + inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + is-binary-path@2.1.0: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} engines: {node: '>=8'} @@ -1066,6 +1470,9 @@ packages: engines: {node: '>=6'} hasBin: true + jsonfile@4.0.0: + resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} + kolorist@1.8.0: resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==} @@ -1094,15 +1501,30 @@ packages: resolution: {integrity: sha512-bbgPw/wmroJsil/GgL4qjDzs5YLTBMQ99weRsok1XCDccQeehbHA/I1oRvk2NPtr7KGZgT/Y5tPRnAtMqeG2Kg==} engines: {node: '>=14'} + locate-path@5.0.0: + resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} + engines: {node: '>=8'} + lodash.deburr@4.1.0: resolution: {integrity: sha512-m/M1U1f3ddMCs6Hq2tAsYThTBDaAKFDX3dwDo97GEYzamXi9SqUpjWi/Rrj/gf3X2n8ktwgZrlP1z6E3v/IExQ==} + lodash@4.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} magic-string@0.30.17: resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} + make-dir@3.1.0: + resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} + engines: {node: '>=8'} + + math-intrinsics@1.1.0: + resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} + engines: {node: '>= 0.4'} + mdn-data@2.12.2: resolution: {integrity: sha512-IEn+pegP1aManZuckezWCO+XZQDplx1366JoVhTpMpBB1sPey/SbveZQUosKiKiGYjg1wH4pMlNgXbCiYgihQA==} @@ -1114,6 +1536,9 @@ packages: resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} engines: {node: '>=8.6'} + minimatch@3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + mlly@1.7.4: resolution: {integrity: sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw==} @@ -1139,15 +1564,46 @@ packages: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} + object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + + object-inspect@1.13.4: + resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==} + engines: {node: '>= 0.4'} + ofetch@1.4.1: resolution: {integrity: sha512-QZj2DfGplQAr2oj9KzceK9Hwz6Whxazmn85yYeVuS3u9XTMOGMRx0kO95MQ+vLsj/S/NwBDMMLU5hpxvI6Tklw==} + once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + + p-limit@2.3.0: + resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} + engines: {node: '>=6'} + + p-locate@4.1.0: + resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} + engines: {node: '>=8'} + + p-try@2.2.0: + resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} + engines: {node: '>=6'} + package-manager-detector@0.2.9: resolution: {integrity: sha512-+vYvA/Y31l8Zk8dwxHhL3JfTuHPm6tlxM2A3GeQyl7ovYnSp1+mzAxClxaOr0qO1TtPxbQxetI7v5XqKLJZk7Q==} parse5@5.1.0: resolution: {integrity: sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ==} + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + + path-is-absolute@1.0.1: + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + engines: {node: '>=0.10.0'} + pathe@1.1.2: resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} @@ -1168,6 +1624,35 @@ packages: resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} engines: {node: '>=12'} + pify@2.3.0: + resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} + engines: {node: '>=0.10.0'} + + pinkie-promise@2.0.1: + resolution: {integrity: sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==} + engines: {node: '>=0.10.0'} + + pinkie@2.0.4: + resolution: {integrity: sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==} + engines: {node: '>=0.10.0'} + + pixi-live2d-display@0.4.0: + resolution: {integrity: sha512-xeYC6y4Y0Bxe9ksWNlGFZC1rII/MPrzPQK7t1c3ubA8RhkOISIqHJl38fNumXqhGEs+yItmgDOkFT+9dsyGDjA==} + peerDependencies: + '@pixi/core': ^6 + '@pixi/display': ^6 + '@pixi/loaders': ^6 + '@pixi/math': ^6 + '@pixi/sprite': ^6 + '@pixi/utils': ^6 + + pixi.js@6.5.10: + resolution: {integrity: sha512-Z2mjeoISml2iuVwT1e/BQwERYM2yKoiR08ZdGrg8y5JjeuVptfTrve4DbPMRN/kEDodesgQZGV/pFv0fE9Q2SA==} + + pkg-dir@4.2.0: + resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} + engines: {node: '>=8'} + pkg-types@1.3.1: resolution: {integrity: sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==} @@ -1175,6 +1660,16 @@ packages: resolution: {integrity: sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ==} engines: {node: ^10 || ^12 || >=14} + promise-polyfill@8.3.0: + resolution: {integrity: sha512-H5oELycFml5yto/atYqmjyigJoAo3+OXwolYiH7OfQuYlAqhxNvTfiNMbV9hsC6Yp83yE5r2KTVmtrG6R9i6Pg==} + + punycode@1.4.1: + resolution: {integrity: sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==} + + qs@6.14.0: + resolution: {integrity: sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==} + engines: {node: '>=0.6'} + query-string@9.1.1: resolution: {integrity: sha512-MWkCOVIcJP9QSKU52Ngow6bsAWAPlPK2MludXvcrS2bGZSl+T1qX9MZvRIkqUIkGLJquMJHWfsT6eRqUpp4aWg==} engines: {node: '>=18'} @@ -1228,6 +1723,22 @@ packages: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true + side-channel-list@1.0.0: + resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==} + engines: {node: '>= 0.4'} + + side-channel-map@1.0.1: + resolution: {integrity: sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==} + engines: {node: '>= 0.4'} + + side-channel-weakmap@1.0.2: + resolution: {integrity: sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==} + engines: {node: '>= 0.4'} + + side-channel@1.1.0: + resolution: {integrity: sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==} + engines: {node: '>= 0.4'} + sirv@3.0.0: resolution: {integrity: sha512-BPwJGUeDaDCHihkORDchNyyTvWFhcusy1XMmhEVTQTwGeybFbp8YEmB+njbPnth1FibULBSBVwCQni25XlCUDg==} engines: {node: '>=18'} @@ -1255,6 +1766,10 @@ packages: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} + strip-outer@1.0.1: + resolution: {integrity: sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==} + engines: {node: '>=0.10.0'} + supports-color@5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} @@ -1279,6 +1794,10 @@ packages: resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} engines: {node: '>=6'} + trim-repeated@1.0.0: + resolution: {integrity: sha512-pkonvlKk8/ZuR0D5tLW8ljt5I8kmxp2XKymhepUeOdCEfKpZaktSArkLHZt76OB1ZvO9bssUsDty4SWhLvZpLg==} + engines: {node: '>=0.10.0'} + ts-lit-plugin@2.0.2: resolution: {integrity: sha512-DPXlVxhjWHxg8AyBLcfSYt2JXgpANV1ssxxwjY98o26gD8MzeiM68HFW9c2VeDd1CjoR3w7B/6/uKxwBQe+ioA==} @@ -1309,6 +1828,10 @@ packages: undici-types@6.20.0: resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} + universalify@0.1.2: + resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} + engines: {node: '>= 4.0.0'} + unocss@65.4.3: resolution: {integrity: sha512-mwSVi0ovPxaDv58yFB7Vm5v1x/q/pUc7aTh7SJbeYoRrpbUGdKiVf20YSQfMqmBNXV9CFDr4o6tabP/58as6RQ==} engines: {node: '>=14'} @@ -1331,6 +1854,10 @@ packages: peerDependencies: browserslist: '>= 4.21.0' + url@0.11.4: + resolution: {integrity: sha512-oCwdVC7mTuWiPyjLUz/COz5TLk6wgp0RCsN+wHZ2Ekneac9w8uuV0njcbbie2ME+Vs+d6duwmYuR3HgQXs1fOg==} + engines: {node: '>= 0.4'} + vite@6.1.0: resolution: {integrity: sha512-RjjMipCKVoR4hVfPY6GQTgveinjNuyLw+qruksLDvA5ktI1150VmcMBKmQaEWJhg/j6Uaf6dNCNA0AfdzUb/hQ==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} @@ -1417,6 +1944,9 @@ packages: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} + wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} @@ -1806,6 +2336,239 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.19.0 + '@pixi/accessibility@6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': + dependencies: + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/app@6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': + dependencies: + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/math': 6.5.10 + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/compressed-textures@6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/loaders@6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': + dependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/loaders': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/constants@6.5.10': {} + + '@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': + dependencies: + '@pixi/constants': 6.5.10 + '@pixi/extensions': 6.5.10 + '@pixi/math': 6.5.10 + '@pixi/runner': 6.5.10 + '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) + '@pixi/ticker': 6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + '@types/offscreencanvas': 2019.7.3 + + '@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': + dependencies: + '@pixi/constants': 6.5.10 + '@pixi/math': 6.5.10 + '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/extensions@6.5.10': {} + + '@pixi/extract@6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': + dependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/math': 6.5.10 + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/filter-alpha@6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))': + dependencies: + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + + '@pixi/filter-blur@6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/settings@6.5.10(@pixi/constants@6.5.10))': + dependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) + + '@pixi/filter-color-matrix@6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))': + dependencies: + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + + '@pixi/filter-displacement@6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)': + dependencies: + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/math': 6.5.10 + + '@pixi/filter-fxaa@6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))': + dependencies: + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + + '@pixi/filter-noise@6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))': + dependencies: + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + + '@pixi/graphics@6.5.10(vnjw7qx4yf6lp5siigycla6i5q)': + dependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/math': 6.5.10 + '@pixi/sprite': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/interaction@6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': + dependencies: + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/math': 6.5.10 + '@pixi/ticker': 6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/loaders@6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': + dependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/math@6.5.10': {} + + '@pixi/mesh-extras@6.5.10(px7ljw7kss2ypii62iz7oundhy)': + dependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/math': 6.5.10 + '@pixi/mesh': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/mesh@6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': + dependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/math': 6.5.10 + '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/mixin-cache-as-bitmap@6.5.10(gsayfpodkyk4qa4ufzl7uemija)': + dependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/math': 6.5.10 + '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) + '@pixi/sprite': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/mixin-get-child-by-name@6.5.10(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))': + dependencies: + '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + + '@pixi/mixin-get-global-position@6.5.10(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)': + dependencies: + '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/math': 6.5.10 + + '@pixi/particle-container@6.5.10(vnjw7qx4yf6lp5siigycla6i5q)': + dependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/math': 6.5.10 + '@pixi/sprite': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/polyfill@6.5.10': + dependencies: + object-assign: 4.1.1 + promise-polyfill: 8.3.0 + + '@pixi/prepare@6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/graphics@6.5.10(vnjw7qx4yf6lp5siigycla6i5q))(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/text@6.5.10(wloyuoiyjdwi7eo66se3n3om5u))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': + dependencies: + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/graphics': 6.5.10(vnjw7qx4yf6lp5siigycla6i5q) + '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) + '@pixi/text': 6.5.10(wloyuoiyjdwi7eo66se3n3om5u) + '@pixi/ticker': 6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/runner@6.5.10': {} + + '@pixi/settings@6.5.10(@pixi/constants@6.5.10)': + dependencies: + '@pixi/constants': 6.5.10 + + '@pixi/sprite-animated@6.5.10(5lsnbztgwvieupexxz2mryw2ca)': + dependencies: + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/sprite': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/ticker': 6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/sprite-tiling@6.5.10(vnjw7qx4yf6lp5siigycla6i5q)': + dependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/math': 6.5.10 + '@pixi/sprite': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/sprite@6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': + dependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/math': 6.5.10 + '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/spritesheet@6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/loaders@6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': + dependencies: + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/loaders': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/math': 6.5.10 + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/text-bitmap@6.5.10(eh244dlueg2daqoi2uo7nzvmpa)': + dependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/loaders': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/math': 6.5.10 + '@pixi/mesh': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) + '@pixi/text': 6.5.10(wloyuoiyjdwi7eo66se3n3om5u) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/text@6.5.10(wloyuoiyjdwi7eo66se3n3om5u)': + dependencies: + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/math': 6.5.10 + '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) + '@pixi/sprite': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))': + dependencies: + '@pixi/extensions': 6.5.10 + '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) + + '@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))': + dependencies: + '@pixi/constants': 6.5.10 + '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) + '@types/earcut': 2.1.4 + earcut: 2.2.4 + eventemitter3: 3.1.2 + url: 0.11.4 + '@polka/url@1.0.0-next.28': {} '@rollup/pluginutils@5.1.4(rollup@4.34.4)': @@ -1894,6 +2657,8 @@ snapshots: dependencies: '@babel/types': 7.26.7 + '@types/earcut@2.1.4': {} + '@types/estree@1.0.6': {} '@types/node@22.13.1': @@ -1901,6 +2666,8 @@ snapshots: undici-types: 6.20.0 optional: true + '@types/offscreencanvas@2019.7.3': {} + '@types/react-dom@19.0.3(@types/react@19.0.8)': dependencies: '@types/react': 19.0.8 @@ -2163,8 +2930,25 @@ snapshots: normalize-path: 3.0.0 picomatch: 2.3.1 + array-union@1.0.2: + dependencies: + array-uniq: 1.0.3 + + array-uniq@1.0.3: {} + + async@2.6.4: + dependencies: + lodash: 4.17.21 + + balanced-match@1.0.2: {} + binary-extensions@2.3.0: {} + brace-expansion@1.1.11: + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + braces@3.0.3: dependencies: fill-range: 7.1.1 @@ -2186,6 +2970,16 @@ snapshots: cac@6.7.14: {} + call-bind-apply-helpers@1.0.2: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + + call-bound@1.0.3: + dependencies: + call-bind-apply-helpers: 1.0.2 + get-intrinsic: 1.3.0 + caniuse-lite@1.0.30001697: {} chalk@2.4.2: @@ -2226,8 +3020,11 @@ snapshots: colorette@2.0.20: {} - commander@2.20.3: - optional: true + commander@2.20.3: {} + + commondir@1.0.1: {} + + concat-map@0.0.1: {} confbox@0.1.8: {} @@ -2258,14 +3055,32 @@ snapshots: leven: 3.1.0 lodash.deburr: 4.1.0 + dunder-proto@1.0.1: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-errors: 1.3.0 + gopd: 1.2.0 + duplexer@0.1.2: {} + earcut@2.2.4: {} + electron-to-chromium@1.5.93: {} + email-addresses@3.1.0: {} + emoji-regex@8.0.0: {} entities@4.5.0: {} + es-define-property@1.0.1: {} + + es-errors@1.3.0: {} + + es-object-atoms@1.1.1: + dependencies: + es-errors: 1.3.0 + esbuild@0.23.1: optionalDependencies: '@esbuild/aix-ppc64': 0.23.1 @@ -2327,6 +3142,8 @@ snapshots: estree-walker@2.0.2: {} + eventemitter3@3.1.2: {} + fast-glob@3.3.3: dependencies: '@nodelib/fs.stat': 2.0.5 @@ -2343,37 +3160,125 @@ snapshots: optionalDependencies: picomatch: 4.0.2 + filename-reserved-regex@2.0.0: {} + + filenamify@4.3.0: + dependencies: + filename-reserved-regex: 2.0.0 + strip-outer: 1.0.1 + trim-repeated: 1.0.0 + fill-range@7.1.1: dependencies: to-regex-range: 5.0.1 filter-obj@5.1.0: {} + find-cache-dir@3.3.2: + dependencies: + commondir: 1.0.1 + make-dir: 3.1.0 + pkg-dir: 4.2.0 + + find-up@4.1.0: + dependencies: + locate-path: 5.0.0 + path-exists: 4.0.0 + + fs-extra@8.1.0: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 4.0.0 + universalify: 0.1.2 + + fs.realpath@1.0.0: {} + fsevents@2.3.3: optional: true + function-bind@1.1.2: {} + gensync@1.0.0-beta.2: {} get-caller-file@2.0.5: {} + get-intrinsic@1.3.0: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-define-property: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.1 + function-bind: 1.1.2 + get-proto: 1.0.1 + gopd: 1.2.0 + has-symbols: 1.1.0 + hasown: 2.0.2 + math-intrinsics: 1.1.0 + + get-proto@1.0.1: + dependencies: + dunder-proto: 1.0.1 + es-object-atoms: 1.1.1 + get-tsconfig@4.10.0: dependencies: resolve-pkg-maps: 1.0.0 + gh-pages@4.0.0: + dependencies: + async: 2.6.4 + commander: 2.20.3 + email-addresses: 3.1.0 + filenamify: 4.3.0 + find-cache-dir: 3.3.2 + fs-extra: 8.1.0 + globby: 6.1.0 + glob-parent@5.1.2: dependencies: is-glob: 4.0.3 + glob@7.2.3: + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + globals@11.12.0: {} globals@15.14.0: {} + globby@6.1.0: + dependencies: + array-union: 1.0.2 + glob: 7.2.3 + object-assign: 4.1.1 + pify: 2.3.0 + pinkie-promise: 2.0.1 + + gopd@1.2.0: {} + + graceful-fs@4.2.11: {} + gzip-size@6.0.0: dependencies: duplexer: 0.1.2 has-flag@3.0.0: {} + has-symbols@1.1.0: {} + + hasown@2.0.2: + dependencies: + function-bind: 1.1.2 + + iconify-icon@2.3.0: + dependencies: + '@iconify/types': 2.0.0 + importx@0.5.1: dependencies: bundle-require: 5.1.0(esbuild@0.24.2) @@ -2385,6 +3290,13 @@ snapshots: transitivePeerDependencies: - supports-color + inflight@1.0.6: + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + + inherits@2.0.4: {} + is-binary-path@2.1.0: dependencies: binary-extensions: 2.3.0 @@ -2407,6 +3319,10 @@ snapshots: json5@2.2.3: {} + jsonfile@4.0.0: + optionalDependencies: + graceful-fs: 4.2.11 + kolorist@1.8.0: {} leven@3.1.0: {} @@ -2446,8 +3362,14 @@ snapshots: mlly: 1.7.4 pkg-types: 1.3.1 + locate-path@5.0.0: + dependencies: + p-locate: 4.1.0 + lodash.deburr@4.1.0: {} + lodash@4.17.21: {} + lru-cache@5.1.1: dependencies: yallist: 3.1.1 @@ -2456,6 +3378,12 @@ snapshots: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 + make-dir@3.1.0: + dependencies: + semver: 6.3.1 + + math-intrinsics@1.1.0: {} + mdn-data@2.12.2: {} merge2@1.4.1: {} @@ -2465,6 +3393,10 @@ snapshots: braces: 3.0.3 picomatch: 2.3.1 + minimatch@3.1.2: + dependencies: + brace-expansion: 1.1.11 + mlly@1.7.4: dependencies: acorn: 8.14.0 @@ -2484,16 +3416,38 @@ snapshots: normalize-path@3.0.0: {} + object-assign@4.1.1: {} + + object-inspect@1.13.4: {} + ofetch@1.4.1: dependencies: destr: 2.0.3 node-fetch-native: 1.6.6 ufo: 1.5.4 + once@1.4.0: + dependencies: + wrappy: 1.0.2 + + p-limit@2.3.0: + dependencies: + p-try: 2.2.0 + + p-locate@4.1.0: + dependencies: + p-limit: 2.3.0 + + p-try@2.2.0: {} + package-manager-detector@0.2.9: {} parse5@5.1.0: {} + path-exists@4.0.0: {} + + path-is-absolute@1.0.1: {} + pathe@1.1.2: {} pathe@2.0.2: {} @@ -2506,6 +3460,67 @@ snapshots: picomatch@4.0.2: {} + pify@2.3.0: {} + + pinkie-promise@2.0.1: + dependencies: + pinkie: 2.0.4 + + pinkie@2.0.4: {} + + pixi-live2d-display@0.4.0(76g3zz2nt7dtjnktvdvk76m2oe): + dependencies: + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/loaders': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/math': 6.5.10 + '@pixi/sprite': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + gh-pages: 4.0.0 + + pixi.js@6.5.10: + dependencies: + '@pixi/accessibility': 6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/app': 6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/compressed-textures': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/loaders@6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/extensions': 6.5.10 + '@pixi/extract': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/filter-alpha': 6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))) + '@pixi/filter-blur': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + '@pixi/filter-color-matrix': 6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))) + '@pixi/filter-displacement': 6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10) + '@pixi/filter-fxaa': 6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))) + '@pixi/filter-noise': 6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))) + '@pixi/graphics': 6.5.10(vnjw7qx4yf6lp5siigycla6i5q) + '@pixi/interaction': 6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/loaders': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/math': 6.5.10 + '@pixi/mesh': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/mesh-extras': 6.5.10(px7ljw7kss2ypii62iz7oundhy) + '@pixi/mixin-cache-as-bitmap': 6.5.10(gsayfpodkyk4qa4ufzl7uemija) + '@pixi/mixin-get-child-by-name': 6.5.10(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))) + '@pixi/mixin-get-global-position': 6.5.10(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10) + '@pixi/particle-container': 6.5.10(vnjw7qx4yf6lp5siigycla6i5q) + '@pixi/polyfill': 6.5.10 + '@pixi/prepare': 6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/graphics@6.5.10(vnjw7qx4yf6lp5siigycla6i5q))(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/text@6.5.10(wloyuoiyjdwi7eo66se3n3om5u))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/runner': 6.5.10 + '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) + '@pixi/sprite': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/sprite-animated': 6.5.10(5lsnbztgwvieupexxz2mryw2ca) + '@pixi/sprite-tiling': 6.5.10(vnjw7qx4yf6lp5siigycla6i5q) + '@pixi/spritesheet': 6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/loaders@6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/text': 6.5.10(wloyuoiyjdwi7eo66se3n3om5u) + '@pixi/text-bitmap': 6.5.10(eh244dlueg2daqoi2uo7nzvmpa) + '@pixi/ticker': 6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + pkg-dir@4.2.0: + dependencies: + find-up: 4.1.0 + pkg-types@1.3.1: dependencies: confbox: 0.1.8 @@ -2518,6 +3533,14 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 + promise-polyfill@8.3.0: {} + + punycode@1.4.1: {} + + qs@6.14.0: + dependencies: + side-channel: 1.1.0 + query-string@9.1.1: dependencies: decode-uri-component: 0.4.1 @@ -2580,6 +3603,34 @@ snapshots: semver@6.3.1: {} + side-channel-list@1.0.0: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.4 + + side-channel-map@1.0.1: + dependencies: + call-bound: 1.0.3 + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + object-inspect: 1.13.4 + + side-channel-weakmap@1.0.2: + dependencies: + call-bound: 1.0.3 + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + object-inspect: 1.13.4 + side-channel-map: 1.0.1 + + side-channel@1.1.0: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.4 + side-channel-list: 1.0.0 + side-channel-map: 1.0.1 + side-channel-weakmap: 1.0.2 + sirv@3.0.0: dependencies: '@polka/url': 1.0.0-next.28 @@ -2609,6 +3660,10 @@ snapshots: dependencies: ansi-regex: 5.0.1 + strip-outer@1.0.1: + dependencies: + escape-string-regexp: 1.0.5 + supports-color@5.5.0: dependencies: has-flag: 3.0.0 @@ -2634,6 +3689,10 @@ snapshots: totalist@3.0.1: {} + trim-repeated@1.0.0: + dependencies: + escape-string-regexp: 1.0.5 + ts-lit-plugin@2.0.2: dependencies: lit-analyzer: 2.0.3 @@ -2665,6 +3724,8 @@ snapshots: undici-types@6.20.0: optional: true + universalify@0.1.2: {} + unocss@65.4.3(@unocss/webpack@65.4.3(rollup@4.34.4))(postcss@8.5.1)(rollup@4.34.4)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.7.3)): dependencies: '@unocss/astro': 65.4.3(rollup@4.34.4)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.7.3)) @@ -2705,6 +3766,11 @@ snapshots: escalade: 3.2.0 picocolors: 1.1.1 + url@0.11.4: + dependencies: + punycode: 1.4.1 + qs: 6.14.0 + vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2): dependencies: esbuild: 0.24.2 @@ -2772,6 +3838,8 @@ snapshots: string-width: 4.2.3 strip-ansi: 6.0.1 + wrappy@1.0.2: {} + y18n@5.0.8: {} yallist@3.1.1: {} From 602a96a06ce41cfcedbe54b6976abf3fa2c60b9a Mon Sep 17 00:00:00 2001 From: Li Date: Sun, 22 Jun 2025 12:36:36 +0800 Subject: [PATCH 12/12] refactor: standardize code formatting and improve consistency across Live2D package --- packages/live2d/package.json | 78 +++++---- packages/live2d/postcss.config.mjs | 2 +- packages/live2d/src/Demo.tsx | 20 +-- packages/live2d/src/common/UnoLitElement.ts | 6 +- .../live2d/src/components/Live2dCanvas.tsx | 24 +-- .../live2d/src/components/Live2dContext.tsx | 24 +-- packages/live2d/src/components/Live2dTips.tsx | 148 +++++++++--------- .../live2d/src/components/Live2dToggle.tsx | 36 +++-- .../live2d/src/components/Live2dTools.tsx | 28 ++-- .../live2d/src/components/Live2dWidget.tsx | 28 ++-- packages/live2d/src/context/config-context.ts | 26 +-- packages/live2d/src/env.d.ts | 2 +- .../live2d/src/events/add-default-message.ts | 7 +- packages/live2d/src/events/before-init.ts | 8 +- packages/live2d/src/events/index.ts | 2 +- packages/live2d/src/events/send-message.ts | 5 +- packages/live2d/src/events/tip-events.ts | 100 +++++++----- packages/live2d/src/events/toggle-canvas.ts | 4 +- packages/live2d/src/events/types.ts | 2 +- .../live2d/src/helpers/dateWithinRange.ts | 4 +- packages/live2d/src/helpers/getPluginTips.ts | 10 +- .../live2d/src/helpers/loadTipsResource.ts | 45 +++--- packages/live2d/src/helpers/mergeTips.ts | 28 +++- packages/live2d/src/helpers/sendMessage.ts | 4 +- .../live2d/src/helpers/timeWithinRange.ts | 9 +- packages/live2d/src/index.ts | 10 +- packages/live2d/src/live2d/model.ts | 60 +++---- packages/live2d/src/live2d/tools/ai-chat.ts | 6 +- packages/live2d/src/live2d/tools/asteroids.ts | 8 +- .../live2d/src/live2d/tools/custom-tool.ts | 12 +- packages/live2d/src/live2d/tools/exit.ts | 12 +- packages/live2d/src/live2d/tools/hitokoto.ts | 16 +- packages/live2d/src/live2d/tools/index.ts | 20 +-- packages/live2d/src/live2d/tools/info.ts | 10 +- .../live2d/src/live2d/tools/screenshot.ts | 12 +- .../live2d/src/live2d/tools/switch-model.ts | 8 +- .../live2d/src/live2d/tools/switch-texture.ts | 6 +- packages/live2d/src/live2d/tools/tools.ts | 2 +- .../live2d/src/styles/unocss.global.css.d.ts | 4 +- packages/live2d/src/utils/distinctArray.ts | 4 +- packages/live2d/src/utils/isNotEmpty.ts | 16 +- packages/live2d/src/utils/isString.ts | 8 +- packages/live2d/src/utils/randomSelection.ts | 2 +- packages/live2d/src/utils/unoMixin.ts | 10 +- packages/live2d/src/utils/util.ts | 28 ++-- packages/live2d/tsconfig.json | 52 +++--- packages/live2d/uno.config.ts | 22 +-- packages/live2d/vite.config.ts | 22 +-- 48 files changed, 520 insertions(+), 480 deletions(-) diff --git a/packages/live2d/package.json b/packages/live2d/package.json index 25b6a73..5ea11bf 100644 --- a/packages/live2d/package.json +++ b/packages/live2d/package.json @@ -1,42 +1,40 @@ { - "name": "live2d", - "private": true, - "version": "1.0.0", - "type": "module", - "files": [ - "dist" - ], - "main": "./dist/live2d.umd.cjs", - "module": "./dist/live2d.js", - "exports": { - ".": { - "import": "./dist/live2d.js", - "require": "./dist/live2d.umd.cjs" - } - }, - "scripts": { - "dev": "vite --open", - "build": "tsc -b && vite build", - "check": "biome check --write" - }, - "dependencies": { - "@lit/context": "^1.1.3", - "@lit/react": "^1.0.7", - "iconify-icon": "^2.3.0", - "lit": "^3.2.1", - "pixi-live2d-display": "^0.4.0", - "pixi.js": "^6.5.2", - "query-string": "^9.1.1", - "react": "^19.0.0", - "react-dom": "^19.0.0" - }, - "devDependencies": { - "@types/react": "^19.0.0", - "@types/react-dom": "^19.0.0", - "@unocss/postcss": "^65.4.3", - "@vitejs/plugin-react": "^4.3.4", - "ts-lit-plugin": "^2.0.2", - "unocss": "^65.4.3", - "vite": "^6.1.0" - } + "name": "live2d", + "private": true, + "version": "1.0.0", + "type": "module", + "files": ["dist"], + "main": "./dist/live2d.umd.cjs", + "module": "./dist/live2d.js", + "exports": { + ".": { + "import": "./dist/live2d.js", + "require": "./dist/live2d.umd.cjs" + } + }, + "scripts": { + "dev": "vite --open", + "build": "tsc -b && vite build", + "check": "biome check --write" + }, + "dependencies": { + "@lit/context": "^1.1.3", + "@lit/react": "^1.0.7", + "iconify-icon": "^2.3.0", + "lit": "^3.2.1", + "pixi-live2d-display": "^0.4.0", + "pixi.js": "^6.5.2", + "query-string": "^9.1.1", + "react": "^19.0.0", + "react-dom": "^19.0.0" + }, + "devDependencies": { + "@types/react": "^19.0.0", + "@types/react-dom": "^19.0.0", + "@unocss/postcss": "^65.4.3", + "@vitejs/plugin-react": "^4.3.4", + "ts-lit-plugin": "^2.0.2", + "unocss": "^65.4.3", + "vite": "^6.1.0" + } } diff --git a/packages/live2d/postcss.config.mjs b/packages/live2d/postcss.config.mjs index e76c97a..b30e274 100644 --- a/packages/live2d/postcss.config.mjs +++ b/packages/live2d/postcss.config.mjs @@ -2,4 +2,4 @@ import UnoCSS from '@unocss/postcss'; export default { plugins: [UnoCSS()], -}; \ No newline at end of file +}; diff --git a/packages/live2d/src/Demo.tsx b/packages/live2d/src/Demo.tsx index 3ba19a6..e45a8b3 100644 --- a/packages/live2d/src/Demo.tsx +++ b/packages/live2d/src/Demo.tsx @@ -1,13 +1,13 @@ -import React from "react"; -import ReactDOM from "react-dom/client"; -import { Live2dContextComponent } from "./components/Live2dContext"; +import React from 'react'; +import ReactDOM from 'react-dom/client'; +import { Live2dContextComponent } from './components/Live2dContext'; -const rootEl = document.getElementById("root"); +const rootEl = document.getElementById('root'); if (rootEl) { - const root = ReactDOM.createRoot(rootEl); - root.render( - - - , - ); + const root = ReactDOM.createRoot(rootEl); + root.render( + + + , + ); } diff --git a/packages/live2d/src/common/UnoLitElement.ts b/packages/live2d/src/common/UnoLitElement.ts index af5257c..afb1175 100644 --- a/packages/live2d/src/common/UnoLitElement.ts +++ b/packages/live2d/src/common/UnoLitElement.ts @@ -1,4 +1,4 @@ -import { LitElement } from "lit"; -import { UNO } from "../utils/unoMixin"; +import { LitElement } from 'lit'; +import { UNO } from '../utils/unoMixin'; -export const UnoLitElement = UNO(LitElement) \ No newline at end of file +export const UnoLitElement = UNO(LitElement); diff --git a/packages/live2d/src/components/Live2dCanvas.tsx b/packages/live2d/src/components/Live2dCanvas.tsx index 99ad580..3533788 100644 --- a/packages/live2d/src/components/Live2dCanvas.tsx +++ b/packages/live2d/src/components/Live2dCanvas.tsx @@ -1,12 +1,12 @@ -import { html, type PropertyValues, type TemplateResult } from "lit"; -import { UnoLitElement } from "../common/UnoLitElement"; +import { consume } from "@lit/context"; import { createComponent } from "@lit/react"; -import React from "react"; +import { type PropertyValues, type TemplateResult, html } from "lit"; import { property, query, state } from "lit/decorators.js"; -import Model from "../live2d/model"; -import { consume } from "@lit/context"; -import { configContext, type Live2dConfig } from "../context/config-context"; +import React from "react"; +import { UnoLitElement } from "../common/UnoLitElement"; +import { type Live2dConfig, configContext } from "../context/config-context"; import { BeforeInitEvent } from "../events/before-init.js"; +import Model from "../live2d/model"; export class Live2dCanvas extends UnoLitElement { @consume({ context: configContext }) @@ -17,18 +17,10 @@ export class Live2dCanvas extends UnoLitElement { private _model: unknown; @query("#live2d") - private _live2d; + private _live2d: HTMLCanvasElement; render(): TemplateResult { - return html` - - - `; + return html` `; } connectedCallback(): void { diff --git a/packages/live2d/src/components/Live2dContext.tsx b/packages/live2d/src/components/Live2dContext.tsx index 9ddaaa3..403ae28 100644 --- a/packages/live2d/src/components/Live2dContext.tsx +++ b/packages/live2d/src/components/Live2dContext.tsx @@ -1,17 +1,17 @@ -import { html, type TemplateResult } from "lit"; -import { UnoLitElement } from "../common/UnoLitElement"; -import { createComponent } from "@lit/react"; -import React from "react"; -import "./Live2dWidget"; -import { provide } from "@lit/context"; -import { configContext, type Live2dConfig } from "../context/config-context"; -import "../events"; +import { createComponent } from '@lit/react'; +import { type TemplateResult, html } from 'lit'; +import React from 'react'; +import { UnoLitElement } from '../common/UnoLitElement'; +import './Live2dWidget'; +import { provide } from '@lit/context'; +import { type Live2dConfig, configContext } from '../context/config-context'; +import '../events'; export class Live2dContext extends UnoLitElement { @provide({ context: configContext }) config = { - apiPath: "https://live2d.fghrsh.net/api", - live2dLocation: "right", + apiPath: 'https://live2d.fghrsh.net/api', + live2dLocation: 'right', consoleShowStatus: false, isTools: true, } as Live2dConfig; @@ -21,10 +21,10 @@ export class Live2dContext extends UnoLitElement { } } -customElements.define("live2d-context", Live2dContext); +customElements.define('live2d-context', Live2dContext); export const Live2dContextComponent = createComponent({ - tagName: "live2d-context", + tagName: 'live2d-context', elementClass: Live2dContext, react: React, }); diff --git a/packages/live2d/src/components/Live2dTips.tsx b/packages/live2d/src/components/Live2dTips.tsx index 552ad2f..65910bc 100644 --- a/packages/live2d/src/components/Live2dTips.tsx +++ b/packages/live2d/src/components/Live2dTips.tsx @@ -1,88 +1,94 @@ -import { html, type TemplateResult } from "lit"; -import { UnoLitElement } from "../common/UnoLitElement"; -import { createComponent } from "@lit/react"; -import React from "react"; -import { consume } from "@lit/context"; -import { configContext, type Live2dConfig } from "../context/config-context"; -import { property, state } from "lit/decorators.js"; -import { isNotEmpty } from "../utils/isNotEmpty"; -import { randomSelection } from "../utils/randomSelection"; -import { unsafeHTML } from "lit/directives/unsafe-html.js"; -import { classMap } from "lit/directives/class-map.js"; -import { SendMessageEvent } from "../events/send-message"; +import { consume } from '@lit/context'; +import { createComponent } from '@lit/react'; +import { type TemplateResult, html } from 'lit'; +import { property, state } from 'lit/decorators.js'; +import { classMap } from 'lit/directives/class-map.js'; +import { unsafeHTML } from 'lit/directives/unsafe-html.js'; +import React from 'react'; +import { UnoLitElement } from '../common/UnoLitElement'; +import { type Live2dConfig, configContext } from '../context/config-context'; +import type { SendMessageEvent } from '../events/send-message'; +import { isNotEmpty } from '../utils/isNotEmpty'; +import { randomSelection } from '../utils/randomSelection'; export class Live2dTips extends UnoLitElement { - @consume({ context: configContext }) - @property({ attribute: false }) - public config?: Live2dConfig; + @consume({ context: configContext }) + @property({ attribute: false }) + public config?: Live2dConfig; - @state() - private _isShow = false; - @state() - private _message = ""; - private priority = -1; - private messageTimer: number | null = null; + @state() + private _isShow = false; + @state() + private _message = ''; + private priority = -1; + private messageTimer: number | null = null; - constructor() { - super(); - this._isShow = false; - this._message = ""; - } + constructor() { + super(); + this._isShow = false; + this._message = ''; + } - render(): TemplateResult { - const classes = { - "opacity-100": this._isShow, - "opacity-0": !this._isShow, - }; - return html` + render(): TemplateResult { + const classes = { + 'opacity-100': this._isShow, + 'opacity-0': !this._isShow, + }; + return html`
${unsafeHTML(this._message)}
`; - } - - connectedCallback(): void { - super.connectedCallback(); - // 为 tips 注册 tips 相关事件 - window.addEventListener("live2d:send-message", this.handleMessage.bind(this)); - } + } - disconnectedCallback(): void { - super.disconnectedCallback(); - window.removeEventListener("live2d:send-message", this.handleMessage.bind(this)); - } + connectedCallback(): void { + super.connectedCallback(); + // 为 tips 注册 tips 相关事件 + window.addEventListener( + 'live2d:send-message', + this.handleMessage.bind(this), + ); + } - handleMessage(e: SendMessageEvent): void { - const { text, timeout, priority } = e.detail; - if (!isNotEmpty(text)) { - return; - } - if (priority < this.priority) { - return; - } - if (this.messageTimer) { - clearTimeout(this.messageTimer); - this.messageTimer = null; - } - const message = randomSelection(text); - if (!isNotEmpty(message)) { - return; - } - this.priority = priority; - this._message = message; - this._isShow = true; - this.messageTimer = setTimeout(() => { - this._isShow = false; - this.priority = -1; - }, timeout); - } + disconnectedCallback(): void { + super.disconnectedCallback(); + window.removeEventListener( + 'live2d:send-message', + this.handleMessage.bind(this), + ); + } + + handleMessage(e: SendMessageEvent): void { + const { text, timeout, priority } = e.detail; + if (!isNotEmpty(text)) { + return; + } + if (priority < this.priority) { + return; + } + if (this.messageTimer) { + clearTimeout(this.messageTimer); + this.messageTimer = null; + } + const message = randomSelection(text); + if (!isNotEmpty(message)) { + return; + } + this.priority = priority; + this._message = message; + this._isShow = true; + this.messageTimer = setTimeout(() => { + this._isShow = false; + this.priority = -1; + }, timeout); + } } -customElements.define("live2d-tips", Live2dTips); +customElements.define('live2d-tips', Live2dTips); export const Live2dTipsComponent = createComponent({ - tagName: "live2d-tips", - elementClass: Live2dTips, - react: React, + tagName: 'live2d-tips', + elementClass: Live2dTips, + react: React, }); diff --git a/packages/live2d/src/components/Live2dToggle.tsx b/packages/live2d/src/components/Live2dToggle.tsx index 209faa0..4d93934 100644 --- a/packages/live2d/src/components/Live2dToggle.tsx +++ b/packages/live2d/src/components/Live2dToggle.tsx @@ -1,9 +1,9 @@ -import { html, type TemplateResult } from "lit"; -import { UnoLitElement } from "../common/UnoLitElement"; -import { createComponent } from "@lit/react"; -import React from "react"; -import { state } from "lit/decorators.js"; -import { ToggleCanvasEvent } from "../events/toggle-canvas"; +import { createComponent } from '@lit/react'; +import { type TemplateResult, html } from 'lit'; +import { state } from 'lit/decorators.js'; +import React from 'react'; +import { UnoLitElement } from '../common/UnoLitElement'; +import { ToggleCanvasEvent } from '../events/toggle-canvas'; export class Live2dToggle extends UnoLitElement { @state() @@ -12,10 +12,10 @@ export class Live2dToggle extends UnoLitElement { connectedCallback(): void { super.connectedCallback(); - this.addEventListener("click", this.handleClick); + this.addEventListener('click', this.handleClick); // 初始化时,判断是否已经隐藏看板娘超过一天,如果是,则显示看板娘。否则,继续隐藏看板娘。 - const live2dDisplay = localStorage.getItem("live2d-display"); + const live2dDisplay = localStorage.getItem('live2d-display'); if (live2dDisplay) { if (Date.now() - Number.parseInt(live2dDisplay) <= 24 * 60 * 60 * 1000) { this.triggerToggleLive2d(false); @@ -27,15 +27,17 @@ export class Live2dToggle extends UnoLitElement { disconnectedCallback(): void { super.disconnectedCallback(); - this.removeEventListener("click", this.handleClick); + this.removeEventListener('click', this.handleClick); } render(): TemplateResult { return html`
看板娘
`; @@ -49,22 +51,22 @@ export class Live2dToggle extends UnoLitElement { // 当前切换栏与 Live2d 的显示状态相反 this._isShow = !isShow; if (isShow) { - localStorage.removeItem("live2d-display"); + localStorage.removeItem('live2d-display'); } else { - localStorage.setItem("live2d-display", Date.now().toString()); + localStorage.setItem('live2d-display', Date.now().toString()); } this.dispatchEvent( new ToggleCanvasEvent({ isShow, - }) + }), ); } } -customElements.define("live2d-toggle", Live2dToggle); +customElements.define('live2d-toggle', Live2dToggle); export const Live2dToggleComponent = createComponent({ - tagName: "live2d-toggle", + tagName: 'live2d-toggle', elementClass: Live2dToggle, react: React, }); diff --git a/packages/live2d/src/components/Live2dTools.tsx b/packages/live2d/src/components/Live2dTools.tsx index 7b80d3c..067db9f 100644 --- a/packages/live2d/src/components/Live2dTools.tsx +++ b/packages/live2d/src/components/Live2dTools.tsx @@ -1,14 +1,14 @@ -import { html, type TemplateResult } from "lit"; -import { UnoLitElement } from "../common/UnoLitElement"; -import { createComponent } from "@lit/react"; -import React from "react"; -import { consume } from "@lit/context"; -import { configContext, type Live2dConfig } from "../context/config-context"; -import { property, state } from "lit/decorators.js"; -import type { Tool } from "../live2d/tools/tools"; -import { CustomTool } from "../live2d/tools/custom-tool"; -import presetTools from "../live2d/tools"; -import "iconify-icon"; +import { consume } from '@lit/context'; +import { createComponent } from '@lit/react'; +import { type TemplateResult, html } from 'lit'; +import { property, state } from 'lit/decorators.js'; +import React from 'react'; +import { UnoLitElement } from '../common/UnoLitElement'; +import { type Live2dConfig, configContext } from '../context/config-context'; +import presetTools from '../live2d/tools'; +import { CustomTool } from '../live2d/tools/custom-tool'; +import type { Tool } from '../live2d/tools/tools'; +import 'iconify-icon'; export class Live2dTools extends UnoLitElement { @consume({ context: configContext }) @@ -49,7 +49,7 @@ export class Live2dTools extends UnoLitElement { const customTools = this.getCustomTools(); // 合并所有工具,并按照 priority 排序 const tools = [...presetTools, ...customTools].sort( - (a, b) => b.priority - a.priority + (a, b) => b.priority - a.priority, ); this._tools.push(...tools); } @@ -95,10 +95,10 @@ export class Live2dTools extends UnoLitElement { } } -customElements.define("live2d-tools", Live2dTools); +customElements.define('live2d-tools', Live2dTools); export const Live2dToolsComponent = createComponent({ - tagName: "live2d-tools", + tagName: 'live2d-tools', elementClass: Live2dTools, react: React, }); diff --git a/packages/live2d/src/components/Live2dWidget.tsx b/packages/live2d/src/components/Live2dWidget.tsx index 99a977b..461812e 100644 --- a/packages/live2d/src/components/Live2dWidget.tsx +++ b/packages/live2d/src/components/Live2dWidget.tsx @@ -1,15 +1,15 @@ -import { html, type TemplateResult } from "lit"; -import { UnoLitElement } from "../common/UnoLitElement"; -import { createComponent } from "@lit/react"; -import React from "react"; -import { property, state } from "lit/decorators.js"; -import { consume } from "@lit/context"; -import { configContext, type Live2dConfig } from "../context/config-context"; -import "./Live2dToggle"; -import "./Live2dTips"; -import "./Live2dCanvas"; -import "./Live2dTools"; -import { ToggleCanvasEvent } from "../events/toggle-canvas"; +import { consume } from '@lit/context'; +import { createComponent } from '@lit/react'; +import { type TemplateResult, html } from 'lit'; +import { property, state } from 'lit/decorators.js'; +import React from 'react'; +import { UnoLitElement } from '../common/UnoLitElement'; +import { type Live2dConfig, configContext } from '../context/config-context'; +import './Live2dToggle'; +import './Live2dTips'; +import './Live2dCanvas'; +import './Live2dTools'; +import type { ToggleCanvasEvent } from '../events/toggle-canvas'; export class Live2dWidget extends UnoLitElement { @consume({ context: configContext }) @@ -53,10 +53,10 @@ export class Live2dWidget extends UnoLitElement { } } -customElements.define("live2d-widget", Live2dWidget); +customElements.define('live2d-widget', Live2dWidget); export const Live2dWidgetComponent = createComponent({ - tagName: "live2d-widget", + tagName: 'live2d-widget', elementClass: Live2dWidget, react: React, }); diff --git a/packages/live2d/src/context/config-context.ts b/packages/live2d/src/context/config-context.ts index c6cec15..b547493 100644 --- a/packages/live2d/src/context/config-context.ts +++ b/packages/live2d/src/context/config-context.ts @@ -1,7 +1,7 @@ import { createContext } from '@lit/context'; -import { CustomToolConfig } from 'live2d/tools/custom-tool'; +import type { CustomToolConfig } from 'live2d/tools/custom-tool'; -export interface ObjectAny extends Record { } +export interface ObjectAny extends Record {} export interface TipMouseover extends ObjectAny { selector: string; @@ -73,7 +73,7 @@ export interface Live2dConfig extends Live2dToolsConfig { // Live2d API 路径 apiPath: string; // Live2d 定位 - live2dLocation: "left" | "right"; + live2dLocation: 'left' | 'right'; // 是否在控制台显示状态 consoleShowStatus?: boolean; // 是否强制使用默认配置 @@ -87,13 +87,15 @@ export interface Live2dConfig extends Live2dToolsConfig { // 用户自定义的 tips 文件路径 tipsPath?: string; // 用户使用插件定义的 tips - selectorTips?: [{ - messageTexts?: { - message: string; - }[]; - selector: string; - mouseAction: "click" | "mouseover" | string | undefined; - }]; + selectorTips?: [ + { + messageTexts?: { + message: string; + }[]; + selector: string; + mouseAction: 'click' | 'mouseover' | string | undefined; + }, + ]; // 页面可见性变化时的 tips backSiteTip: string[] | string; // 复制内容时的 tips @@ -101,8 +103,8 @@ export interface Live2dConfig extends Live2dToolsConfig { // 控制台打印 tips openConsoleTip: string[] | string; // 首次打开站点是否显示 tips - firstOpenSite?: boolean + firstOpenSite?: boolean; [key: string]: unknown; } -export const configContext = createContext("config"); \ No newline at end of file +export const configContext = createContext('config'); diff --git a/packages/live2d/src/env.d.ts b/packages/live2d/src/env.d.ts index 09c0137..b0ac762 100644 --- a/packages/live2d/src/env.d.ts +++ b/packages/live2d/src/env.d.ts @@ -1 +1 @@ -/// \ No newline at end of file +/// diff --git a/packages/live2d/src/events/add-default-message.ts b/packages/live2d/src/events/add-default-message.ts index b00a15f..85ea866 100644 --- a/packages/live2d/src/events/add-default-message.ts +++ b/packages/live2d/src/events/add-default-message.ts @@ -1,6 +1,7 @@ -import { Live2dEvent } from "./types"; +import { Live2dEvent } from './types'; -export const ADD_DEFAULT_MESSAGE_EVENT_NAME = "live2d:add-default-message" as const; +export const ADD_DEFAULT_MESSAGE_EVENT_NAME = + 'live2d:add-default-message' as const; declare global { interface GlobalEventHandlersEventMap { @@ -20,4 +21,4 @@ export class AddDefaultMessageEvent extends Live2dEvent { +window.addEventListener('live2d:before-init', async (e) => { const config = e.detail.config; if (!config) { return; @@ -20,7 +32,7 @@ window.addEventListener("live2d:before-init", async (e) => { return; } _registerTipEventListener(config, tips); -}) +}); const _getWelComeMessage = (times: TipTime[]) => { if (hasWebsiteHome) { @@ -33,8 +45,10 @@ const _getWelComeMessage = (times: TipTime[]) => { const message = `欢迎阅读「${documentTitle}」`; const domain = getReferrerDomain(); - return domain ? `Hello!来自 ${domain} 的朋友
${message}` : message; -} + return domain + ? `Hello!来自 ${domain} 的朋友
${message}` + : message; +}; const _welcomeEvent = (times: TipTime[]) => { const message = _getWelComeMessage(times); @@ -42,7 +56,7 @@ const _welcomeEvent = (times: TipTime[]) => { return; } sendMessage(message, 7000, 4); -} +}; const _holidayEvent = (seasons: TipSeason[]) => { for (const { date, text } of seasons) { @@ -50,34 +64,34 @@ const _holidayEvent = (seasons: TipSeason[]) => { window.dispatchEvent(new AddDefaultMessageEvent({ message: text })); } } -} +}; const _userLeaveEvent = (message: TipMessage) => { const { visibilitychange } = message; - document.addEventListener("visibilitychange", () => { + document.addEventListener('visibilitychange', () => { if (!document.hidden) { sendMessage(visibilitychange, 6000, 2); } }); -} +}; const _userCopyEvent = (message: TipMessage) => { const { copy } = message; - window.addEventListener("copy", () => { + window.addEventListener('copy', () => { sendMessage(copy, 6000, 2); }); -} +}; const _userOpenConsoleEvent = (message: TipMessage) => { const { console } = message; - const devtools = () => { }; + const devtools = () => {}; devtools.toString = () => { sendMessage(console, 6000, 2); }; -} +}; const _userClickEvent = (clicks: TipClick[]) => { - window.addEventListener("click", (event) => { + window.addEventListener('click', (event) => { const path = event.composedPath(); const target = path[0]; if (!(target instanceof HTMLElement)) { @@ -91,15 +105,15 @@ const _userClickEvent = (clicks: TipClick[]) => { if (!message) { continue; } - message = message.replace("{text}", target.innerText); + message = message.replace('{text}', target.innerText); sendMessage(message, 4000, 1); return; } }); -} +}; const _userMouseoverEvent = (mouseovers: TipMouseover[]) => { - window.addEventListener("mouseover", (event: MouseEvent) => { + window.addEventListener('mouseover', (event: MouseEvent) => { const path = event.composedPath(); const target = path[0]; if (!(target instanceof HTMLElement)) { @@ -113,12 +127,12 @@ const _userMouseoverEvent = (mouseovers: TipMouseover[]) => { if (!message) { continue; } - message = message.replace("{text}", target.innerText); + message = message.replace('{text}', target.innerText); sendMessage(message, 4000, 1); return; } }); -} +}; /** * 监听用户是否处于活动状态,如果用户长时间不活动,则向 Live2d 发送消息 @@ -127,22 +141,24 @@ const _userActionEvent = (message: TipMessage) => { let userAction = false; let userActionTimer: number | undefined; const defaultMessage = message.default; - const idleMessage: string[] = isString(defaultMessage) ? [defaultMessage] : (defaultMessage || []); + const idleMessage: string[] = isString(defaultMessage) + ? [defaultMessage] + : defaultMessage || []; - window.addEventListener("mousemove", () => { + window.addEventListener('mousemove', () => { userAction = true; }); - window.addEventListener("keydown", () => { + window.addEventListener('keydown', () => { userAction = true; }); - window.addEventListener("live2d:add-default-message", (ev) => { + window.addEventListener('live2d:add-default-message', (ev) => { const message = ev.detail.message; if (Array.isArray(message)) { idleMessage.push(...message); } else { idleMessage.push(message); } - }) + }); setInterval(() => { if (userAction) { userAction = false; @@ -157,12 +173,12 @@ const _userActionEvent = (message: TipMessage) => { sendMessage(message.default, 6000, 2); }, 20000); }, 1000); -} +}; const _registerTipEventListener = (config: Live2dConfig, tips: TipConfig) => { // 首次进入页面时 if (config.firstOpenSite) { - _welcomeEvent(tips.time) + _welcomeEvent(tips.time); } // 节日事件 _holidayEvent(tips.seasons); @@ -178,7 +194,7 @@ const _registerTipEventListener = (config: Live2dConfig, tips: TipConfig) => { _userCopyEvent(tips.message); // 用户离开页面事件 _userLeaveEvent(tips.message); -} +}; const _loadTips = async (config: Live2dConfig) => { if (!config) { @@ -202,9 +218,11 @@ const _loadTips = async (config: Live2dConfig) => { themeTips, fullOrDefaultTips, }); -} +}; -export const _getFullOrDefaultTips = async (config: Live2dConfig): Promise => { +export const _getFullOrDefaultTips = async ( + config: Live2dConfig, +): Promise => { // 获取插件文件中的全量 tips 文件 if (isNotEmptyString(config?.tipsPath)) { const tipsResult = await loadTipsResource(config.tipsPath); @@ -213,5 +231,5 @@ export const _getFullOrDefaultTips = async (config: Live2dConfig): Promise extends CustomEvent { constructor(type: string, detail: T, options?: EventInit) { super(type, { detail, ...options }); } -} \ No newline at end of file +} diff --git a/packages/live2d/src/helpers/dateWithinRange.ts b/packages/live2d/src/helpers/dateWithinRange.ts index cd86302..d071f54 100644 --- a/packages/live2d/src/helpers/dateWithinRange.ts +++ b/packages/live2d/src/helpers/dateWithinRange.ts @@ -3,7 +3,7 @@ const DATE_SEPARATOR = '/'; /** * 检查指定的日期是否在当前日期范围内。 - * + * * @param date 指定的日期格式为 `MM/DD` 或 `MM/DD-MM/DD`。 * @returns 如果日期在当前范围内则返回 true, 否则返回 false。 */ @@ -23,4 +23,4 @@ export const dataWithinRange = (date: string): boolean => { startDay <= currentDate && currentDate <= endDay ); -} +}; diff --git a/packages/live2d/src/helpers/getPluginTips.ts b/packages/live2d/src/helpers/getPluginTips.ts index ae7e8a8..465e54c 100644 --- a/packages/live2d/src/helpers/getPluginTips.ts +++ b/packages/live2d/src/helpers/getPluginTips.ts @@ -1,9 +1,9 @@ -import type { Live2dConfig, TipConfig } from "../context/config-context"; -import { isNotEmpty } from "../utils/isNotEmpty"; +import type { Live2dConfig, TipConfig } from '../context/config-context'; +import { isNotEmpty } from '../utils/isNotEmpty'; /** * 整合插件配置中的 tips 元素。 - * + * * 插件配置中的元素如下所示: * "selectorTips" : [ { * "mouseAction" : "mouseover", @@ -36,7 +36,7 @@ export const getPluginTips = (config: Live2dConfig): TipConfig => { selector: item.selector, text: texts, }; - if (item.mouseAction === "click") { + if (item.mouseAction === 'click') { tips.click?.push(obj); } else { tips.mouseover?.push(obj); @@ -54,4 +54,4 @@ export const getPluginTips = (config: Live2dConfig): TipConfig => { tips.message.console = config.openConsoleTip; } return tips; -} \ No newline at end of file +}; diff --git a/packages/live2d/src/helpers/loadTipsResource.ts b/packages/live2d/src/helpers/loadTipsResource.ts index 893d151..ce32508 100644 --- a/packages/live2d/src/helpers/loadTipsResource.ts +++ b/packages/live2d/src/helpers/loadTipsResource.ts @@ -2,9 +2,9 @@ import type { TipConfig } from '../context/config-context'; /** * 远程加载提示资源 - * - * @param url - * @returns + * + * @param url + * @returns */ export function loadTipsResource(url?: string) { const defaultObj: TipConfig = { @@ -14,23 +14,22 @@ export function loadTipsResource(url?: string) { message: {}, time: [], }; - return new Promise((resolve) => { - if (!url) { - resolve(defaultObj); - return; - } - try { - fetch(url) - .then((response) => response.json()) - .then((result) => { - resolve(result); - }) - .catch(() => { - resolve(defaultObj); - }); - } catch (e) { - // ignore - } - }); -}; \ No newline at end of file + return new Promise((resolve) => { + if (!url) { + resolve(defaultObj); + return; + } + try { + fetch(url) + .then((response) => response.json()) + .then((result) => { + resolve(result); + }) + .catch(() => { + resolve(defaultObj); + }); + } catch (e) { + // ignore + } + }); +} diff --git a/packages/live2d/src/helpers/mergeTips.ts b/packages/live2d/src/helpers/mergeTips.ts index f31507e..20d86f7 100644 --- a/packages/live2d/src/helpers/mergeTips.ts +++ b/packages/live2d/src/helpers/mergeTips.ts @@ -1,5 +1,5 @@ -import type { TipConfig } from "../context/config-context"; -import { distinctArray } from "../utils/distinctArray"; +import type { TipConfig } from '../context/config-context'; +import { distinctArray } from '../utils/distinctArray'; /** * 合并各个渠道的 tips,根据获取位置不同,合并时优先级也不同。优先级按高到低的顺序为 @@ -16,16 +16,28 @@ import { distinctArray } from "../utils/distinctArray"; * @param themeTips 主题提供的 tips * @param defaultTips 配置/默认的 tips */ -export const mergeTips = ({ pluginTips, themeTips, fullOrDefaultTips }: { +export const mergeTips = ({ + pluginTips, + themeTips, + fullOrDefaultTips, +}: { pluginTips: TipConfig; themeTips: TipConfig; fullOrDefaultTips: TipConfig; }) => { const defaultTips = { ...fullOrDefaultTips }; - const duplicateClick = [...pluginTips.click, ...themeTips.click, ...fullOrDefaultTips.click]; - const duplicateMouseover = [...pluginTips.mouseover, ...themeTips.mouseover, ...fullOrDefaultTips.mouseover]; - defaultTips.click = distinctArray(duplicateClick, "selector"); - defaultTips.mouseover = distinctArray(duplicateMouseover, "selector"); + const duplicateClick = [ + ...pluginTips.click, + ...themeTips.click, + ...fullOrDefaultTips.click, + ]; + const duplicateMouseover = [ + ...pluginTips.mouseover, + ...themeTips.mouseover, + ...fullOrDefaultTips.mouseover, + ]; + defaultTips.click = distinctArray(duplicateClick, 'selector'); + defaultTips.mouseover = distinctArray(duplicateMouseover, 'selector'); defaultTips.message = { ...defaultTips.message, ...pluginTips.message }; return defaultTips; -}; \ No newline at end of file +}; diff --git a/packages/live2d/src/helpers/sendMessage.ts b/packages/live2d/src/helpers/sendMessage.ts index edc36b2..c8214ce 100644 --- a/packages/live2d/src/helpers/sendMessage.ts +++ b/packages/live2d/src/helpers/sendMessage.ts @@ -1,4 +1,4 @@ -import { SendMessageEvent } from "../events/send-message"; +import { SendMessageEvent } from '../events/send-message'; /** * 向 Live2D 发送消息事件 @@ -9,7 +9,7 @@ import { SendMessageEvent } from "../events/send-message"; export function sendMessage( text: string | string[] | undefined, timeout = 3000, - priority = 0 + priority = 0, ) { if (!text) { return; diff --git a/packages/live2d/src/helpers/timeWithinRange.ts b/packages/live2d/src/helpers/timeWithinRange.ts index d329dcc..e34fee3 100644 --- a/packages/live2d/src/helpers/timeWithinRange.ts +++ b/packages/live2d/src/helpers/timeWithinRange.ts @@ -1,8 +1,8 @@ -const SEPARATOR = "-"; +const SEPARATOR = '-'; /** * 判断当前是否在指定时间范围内。 - * + * * @param hour 指定的时间范围格式为 `HH-HH`。 * @returns 如果当前时间在指定范围内则返回 true, 否则返回 false。 */ @@ -12,13 +12,12 @@ export const timeWithinRange = (hour: string): boolean => { const after = Number.parseInt(spiltTime[0]); const before = Number.parseInt(spiltTime[1]) || after; - if (after < 0 || before > 23 || after > before) { - throw new Error("时间范围不正确"); + throw new Error('时间范围不正确'); } if (after <= now.getHours() && now.getHours() <= before) { return true; } return false; -} \ No newline at end of file +}; diff --git a/packages/live2d/src/index.ts b/packages/live2d/src/index.ts index 615b6eb..37dd2ca 100644 --- a/packages/live2d/src/index.ts +++ b/packages/live2d/src/index.ts @@ -1,9 +1,5 @@ -import { Live2dToggle } from "./components/Live2dToggle" -import { Live2dWidget } from "./components/Live2dWidget" import { Live2dContext } from './components/Live2dContext'; +import { Live2dToggle } from './components/Live2dToggle'; +import { Live2dWidget } from './components/Live2dWidget'; -export { - Live2dToggle, - Live2dWidget, - Live2dContext, -} \ No newline at end of file +export { Live2dToggle, Live2dWidget, Live2dContext }; diff --git a/packages/live2d/src/live2d/model.ts b/packages/live2d/src/live2d/model.ts index 565732c..9e9371b 100644 --- a/packages/live2d/src/live2d/model.ts +++ b/packages/live2d/src/live2d/model.ts @@ -1,10 +1,10 @@ -import * as PIXI from "pixi.js"; -import type { Live2dConfig } from "../context/config-context"; -import { sendMessage } from "../helpers/sendMessage"; -import { isNotEmptyString } from "../utils/isString"; -import "../libs/live2d.min.js"; -import "../libs/live2dcubismcore.min.js"; -import { Live2DModel } from "pixi-live2d-display"; +import * as PIXI from 'pixi.js'; +import type { Live2dConfig } from '../context/config-context'; +import { sendMessage } from '../helpers/sendMessage'; +import { isNotEmptyString } from '../utils/isString'; +import '../libs/live2d.min.js'; +import '../libs/live2dcubismcore.min.js'; +import { Live2DModel } from 'pixi-live2d-display'; window.PIXI = PIXI; @@ -30,25 +30,26 @@ class Model { constructor(root: HTMLCanvasElement, config: Live2dConfig) { const apiPath = config.apiPath; if (!isNotEmptyString(apiPath)) { - throw new Error("Invalid initWidget argument!"); + throw new Error('Invalid initWidget argument!'); } - this.#apiPath = apiPath.endsWith("/") ? apiPath : `${apiPath}/`; + this.#apiPath = apiPath.endsWith('/') ? apiPath : `${apiPath}/`; this.#config = config; this.#live2dRootElement = root; this.#app = new PIXI.Application({ view: this.#live2dRootElement, autoStart: true, - resizeTo: window, - // 透明背景 + height: 300, + width: 300, backgroundColor: 0x00000000, + backgroundAlpha: 0, }); this._loadingModel(); } private _loadingModel() { - let modelId = localStorage.getItem("modelId"); - let modelTexturesId = localStorage.getItem("modelTexturesId"); + let modelId = localStorage.getItem('modelId'); + let modelTexturesId = localStorage.getItem('modelTexturesId'); if (modelId === null || !!this.#config.isForceUseDefaultConfig) { // 加载指定模型的指定材质 modelId = String(this.#config.modelId || 1); // 模型 ID @@ -57,7 +58,7 @@ class Model { this.loadModel( Number(modelId), Number(modelTexturesId), - "Live2D 模型加载中..." + 'Live2D 模型加载中...', ); } @@ -69,52 +70,55 @@ class Model { * @param text 加载时的消息 */ async loadModel(modelId: number, modelTexturesId: number, text?: string) { - localStorage.setItem("modelId", String(modelId)); - localStorage.setItem("modelTexturesId", String(modelTexturesId)); + localStorage.setItem('modelId', String(modelId)); + localStorage.setItem('modelTexturesId', String(modelTexturesId)); // 发送消息事件 if (text) { sendMessage(text, 4000, 3); } const model = await Live2DModel.from( - "https://cdn.jsdelivr.net/gh/guansss/pixi-live2d-display/test/assets/haru/haru_greeter_t03.model3.json", + 'https://live2d.fghrsh.net/api/get/?id=1-53', { onLoad: () => { console.log( - `[Status] Live2D 模型 ${modelId}-${modelTexturesId} 加载完成` + `[Status] Live2D 模型 ${modelId}-${modelTexturesId} 加载完成`, ); }, - } + }, ); - this.#app.stage.addChild(model); - model.scale.set(0.25); + const scaleX = this.#app.view.height / model.width; + const scaleY = this.#app.view.height / model.height; + + model.scale.set(scaleX, scaleY); + this.#app.stage.addChild(model); } /** * 随机切换模型贴图 */ async loadRandTextures() { - const modelId = Number(localStorage.getItem("modelId")); - const modelTexturesId = Number(localStorage.getItem("modelTexturesId")); + const modelId = Number(localStorage.getItem('modelId')); + const modelTexturesId = Number(localStorage.getItem('modelTexturesId')); // 可选 "rand"(随机), "switch"(顺序) const result = (await fetch( - `${this.#apiPath}rand_textures/?id=${modelId}-${modelTexturesId}` + `${this.#apiPath}rand_textures/?id=${modelId}-${modelTexturesId}`, ).then((response) => response.json())) as ModelTexturesResult; const texturesId = result.textures.id; if (texturesId === 1 && (modelTexturesId === 1 || modelTexturesId === 0)) { - sendMessage("我还没有其他衣服呢!", 4000, 3); + sendMessage('我还没有其他衣服呢!', 4000, 3); return; } - this.loadModel(modelId, texturesId, "我的新衣服好看嘛?"); + this.loadModel(modelId, texturesId, '我的新衣服好看嘛?'); } /** * 切换模型 */ async loadOtherModel() { - const modelId = Number(localStorage.getItem("modelId")); + const modelId = Number(localStorage.getItem('modelId')); const result = (await fetch(`${this.#apiPath}switch/?id=${modelId}`).then( - (response) => response.json() + (response) => response.json(), )) as ModelResult; this.loadModel(result.model.id, 0, result.model.message); } diff --git a/packages/live2d/src/live2d/tools/ai-chat.ts b/packages/live2d/src/live2d/tools/ai-chat.ts index c7c3090..d05dc49 100644 --- a/packages/live2d/src/live2d/tools/ai-chat.ts +++ b/packages/live2d/src/live2d/tools/ai-chat.ts @@ -1,5 +1,5 @@ -import { isNotEmptyString } from "../../utils/isString"; -import { Tool } from "./tools"; +import { isNotEmptyString } from '../../utils/isString'; +import { Tool } from './tools'; /** * AI 聊天工具 @@ -9,7 +9,7 @@ export class AIChatTool extends Tool { icon() { const icon = this.getConfig().aiChatUrl; - return isNotEmptyString(icon) ? icon : "ph-chats-circle-fill"; + return isNotEmptyString(icon) ? icon : 'ph-chats-circle-fill'; } execute() { diff --git a/packages/live2d/src/live2d/tools/asteroids.ts b/packages/live2d/src/live2d/tools/asteroids.ts index 561150b..10dc0a1 100644 --- a/packages/live2d/src/live2d/tools/asteroids.ts +++ b/packages/live2d/src/live2d/tools/asteroids.ts @@ -1,5 +1,5 @@ -import { isNotEmptyString } from "../../utils/isString"; -import { Tool } from "./tools"; +import { isNotEmptyString } from '../../utils/isString'; +import { Tool } from './tools'; declare global { interface Window { @@ -14,12 +14,12 @@ export class AsteroidsTool extends Tool { priority = 80; icon() { const icon = this.getConfig().asteroidsIcon; - return isNotEmptyString(icon) ? icon : "ph-paper-plane-tilt-fill"; + return isNotEmptyString(icon) ? icon : 'ph-paper-plane-tilt-fill'; } execute() { // @ts-ignore - import("../../libs/asteroids.min.js").then((module) => { + import('../../libs/asteroids.min.js').then((module) => { new module.default(); }); } diff --git a/packages/live2d/src/live2d/tools/custom-tool.ts b/packages/live2d/src/live2d/tools/custom-tool.ts index 94591ff..e430d5b 100644 --- a/packages/live2d/src/live2d/tools/custom-tool.ts +++ b/packages/live2d/src/live2d/tools/custom-tool.ts @@ -1,6 +1,6 @@ -import type { Live2dConfig } from "../../context/config-context"; -import { isNotEmptyString } from "../../utils/isString"; -import { Tool } from "./tools"; +import type { Live2dConfig } from '../../context/config-context'; +import { isNotEmptyString } from '../../utils/isString'; +import { Tool } from './tools'; export type CustomToolConfig = { name: string; @@ -20,7 +20,7 @@ export class CustomTool extends Tool { constructor( config: Live2dConfig, - { name, icon, execute, priority }: CustomToolConfig + { name, icon, execute, priority }: CustomToolConfig, ) { super(config); this._name = name; @@ -35,11 +35,11 @@ export class CustomTool extends Tool { icon() { const icon = this._icon; - return isNotEmptyString(icon) ? icon : "ph-question-fill"; + return isNotEmptyString(icon) ? icon : 'ph-question-fill'; } execute() { - if (typeof this._execute === "string") { + if (typeof this._execute === 'string') { const customClass = new Function(` return class { ${this._execute} diff --git a/packages/live2d/src/live2d/tools/exit.ts b/packages/live2d/src/live2d/tools/exit.ts index 1c26186..28aa442 100644 --- a/packages/live2d/src/live2d/tools/exit.ts +++ b/packages/live2d/src/live2d/tools/exit.ts @@ -1,7 +1,7 @@ -import { sendMessage } from "../../helpers/sendMessage"; -import { isNotEmptyString } from "../../utils/isString"; -import { Tool } from "./tools"; -import { ToggleCanvasEvent } from "../../events/toggle-canvas"; +import { ToggleCanvasEvent } from '../../events/toggle-canvas'; +import { sendMessage } from '../../helpers/sendMessage'; +import { isNotEmptyString } from '../../utils/isString'; +import { Tool } from './tools'; /** * 退出 Live2d 工具 @@ -11,11 +11,11 @@ export class ExitTool extends Tool { icon() { const icon = this.getConfig().exitIcon; - return isNotEmptyString(icon) ? icon : "ph-x-bold"; + return isNotEmptyString(icon) ? icon : 'ph-x-bold'; } execute() { - sendMessage("愿你有一天能与重要的人重逢。", 2000, 4); + sendMessage('愿你有一天能与重要的人重逢。', 2000, 4); setTimeout(() => { // 触发退出 Live2d 事件 window.dispatchEvent(new ToggleCanvasEvent({ isShow: false })); diff --git a/packages/live2d/src/live2d/tools/hitokoto.ts b/packages/live2d/src/live2d/tools/hitokoto.ts index c9dc296..80c9a61 100644 --- a/packages/live2d/src/live2d/tools/hitokoto.ts +++ b/packages/live2d/src/live2d/tools/hitokoto.ts @@ -1,7 +1,7 @@ -import queryString from "query-string"; -import { isNotEmptyString } from "../../utils/isString"; -import { Tool } from "./tools"; -import { sendMessage } from "../../helpers/sendMessage"; +import queryString from 'query-string'; +import { sendMessage } from '../../helpers/sendMessage'; +import { isNotEmptyString } from '../../utils/isString'; +import { Tool } from './tools'; /** * 一言工具,使用一言接口获取一句话 @@ -12,11 +12,11 @@ import { sendMessage } from "../../helpers/sendMessage"; export class HitokotoTool extends Tool { priority = 90; - _default_api = "https://v1.hitokoto.cn"; + _default_api = 'https://v1.hitokoto.cn'; icon() { const icon = this.getConfig().aiChatUrl; - return isNotEmptyString(icon) ? icon : "ph-chat-circle-fill"; + return isNotEmptyString(icon) ? icon : 'ph-chat-circle-fill'; } async execute() { @@ -34,12 +34,12 @@ export class HitokotoTool extends Tool { > { const unverifiedApi = this.getConfig().hitokotoApi || this._default_api; const parsedApi = queryString.parseUrl(unverifiedApi); - const newParams = { ...parsedApi.query, encode: "json", charset: "utf-8" }; + const newParams = { ...parsedApi.query, encode: 'json', charset: 'utf-8' }; const hitokotoApi = `${parsedApi.url}?${queryString.stringify(newParams)}`; const { hitokoto, from, creator } = await this._fetchHitokoto(hitokotoApi); if (isNotEmptyString(hitokoto)) { return { - hitokoto: "hitokoto", + hitokoto: 'hitokoto', description: `这句一言来自 「${from}」,是 ${creator} 在 hitokoto.cn 投稿的。`, }; } diff --git a/packages/live2d/src/live2d/tools/index.ts b/packages/live2d/src/live2d/tools/index.ts index 32ba4a3..880d148 100644 --- a/packages/live2d/src/live2d/tools/index.ts +++ b/packages/live2d/src/live2d/tools/index.ts @@ -1,13 +1,13 @@ -import type { Live2dConfig } from "../../context/config-context"; -import { AIChatTool } from "./ai-chat"; -import { AsteroidsTool } from "./asteroids"; -import { ExitTool } from "./exit"; -import { HitokotoTool } from "./hitokoto"; -import { InfoTool } from "./info"; -import { ScreenshotTool } from "./screenshot"; -import { SwitchModelTool } from "./switch-model"; -import { SwitchTextureTool } from "./switch-texture"; -import type { Tool } from "./tools"; +import type { Live2dConfig } from '../../context/config-context'; +import { AIChatTool } from './ai-chat'; +import { AsteroidsTool } from './asteroids'; +import { ExitTool } from './exit'; +import { HitokotoTool } from './hitokoto'; +import { InfoTool } from './info'; +import { ScreenshotTool } from './screenshot'; +import { SwitchModelTool } from './switch-model'; +import { SwitchTextureTool } from './switch-texture'; +import type { Tool } from './tools'; export type ToolConstructor = new (config: Live2dConfig) => Tool; diff --git a/packages/live2d/src/live2d/tools/info.ts b/packages/live2d/src/live2d/tools/info.ts index 6ea0a9e..2672daa 100644 --- a/packages/live2d/src/live2d/tools/info.ts +++ b/packages/live2d/src/live2d/tools/info.ts @@ -1,20 +1,20 @@ -import { isNotEmptyString } from "../../utils/isString"; -import { Tool } from "./tools"; +import { isNotEmptyString } from '../../utils/isString'; +import { Tool } from './tools'; /** * 前往站点工具 */ export class InfoTool extends Tool { priority = 40; - + icon() { const icon = this.getConfig().infoIcon; - return isNotEmptyString(icon) ? icon : "ph-info-fill"; + return isNotEmptyString(icon) ? icon : 'ph-info-fill'; } execute() { const siteUrl = - this.getConfig().infoSite || "https://github.com/LIlGG/plugin-live2d"; + this.getConfig().infoSite || 'https://github.com/LIlGG/plugin-live2d'; window.open(siteUrl); } } diff --git a/packages/live2d/src/live2d/tools/screenshot.ts b/packages/live2d/src/live2d/tools/screenshot.ts index f8174b6..b9af1a9 100644 --- a/packages/live2d/src/live2d/tools/screenshot.ts +++ b/packages/live2d/src/live2d/tools/screenshot.ts @@ -1,6 +1,6 @@ -import { sendMessage } from "../../helpers/sendMessage"; -import { isNotEmptyString } from "../../utils/isString"; -import { Tool } from "./tools"; +import { sendMessage } from '../../helpers/sendMessage'; +import { isNotEmptyString } from '../../utils/isString'; +import { Tool } from './tools'; declare const Live2D: { captureName: string; @@ -15,12 +15,12 @@ export class ScreenshotTool extends Tool { icon() { const icon = this.getConfig().screenshotIcon; - return isNotEmptyString(icon) ? icon : "ph-camera-fill"; + return isNotEmptyString(icon) ? icon : 'ph-camera-fill'; } execute() { - sendMessage("照好了嘛,是不是很可爱呢?", 6000, 2); - const screenshotName = this.getConfig().screenshotName || "live2d"; + sendMessage('照好了嘛,是不是很可爱呢?', 6000, 2); + const screenshotName = this.getConfig().screenshotName || 'live2d'; Live2D.captureName = `${screenshotName}.png`; Live2D.captureFrame = true; } diff --git a/packages/live2d/src/live2d/tools/switch-model.ts b/packages/live2d/src/live2d/tools/switch-model.ts index 23fdabe..7e3d263 100644 --- a/packages/live2d/src/live2d/tools/switch-model.ts +++ b/packages/live2d/src/live2d/tools/switch-model.ts @@ -1,5 +1,5 @@ -import { isNotEmptyString } from "../../utils/isString"; -import { Tool } from "./tools"; +import { isNotEmptyString } from '../../utils/isString'; +import { Tool } from './tools'; /** * 切换模型工具 @@ -9,10 +9,10 @@ export class SwitchModelTool extends Tool { icon() { const icon = this.getConfig().switchModelIcon; - return isNotEmptyString(icon) ? icon : "ph-dress-fill"; + return isNotEmptyString(icon) ? icon : 'ph-dress-fill'; } execute() { - console.log("Model switch event emitted."); + console.log('Model switch event emitted.'); } } diff --git a/packages/live2d/src/live2d/tools/switch-texture.ts b/packages/live2d/src/live2d/tools/switch-texture.ts index 05cc176..c4e2373 100644 --- a/packages/live2d/src/live2d/tools/switch-texture.ts +++ b/packages/live2d/src/live2d/tools/switch-texture.ts @@ -1,5 +1,5 @@ -import { isNotEmptyString } from "../../utils/isString"; -import { Tool } from "./tools"; +import { isNotEmptyString } from '../../utils/isString'; +import { Tool } from './tools'; /** * 切换纹理工具 @@ -9,7 +9,7 @@ export class SwitchTextureTool extends Tool { icon() { const icon = this.getConfig().switchTextureIcon; - return isNotEmptyString(icon) ? icon : "ph-arrows-counter-clockwise-fill"; + return isNotEmptyString(icon) ? icon : 'ph-arrows-counter-clockwise-fill'; } execute() { diff --git a/packages/live2d/src/live2d/tools/tools.ts b/packages/live2d/src/live2d/tools/tools.ts index 89ba292..eb09c05 100644 --- a/packages/live2d/src/live2d/tools/tools.ts +++ b/packages/live2d/src/live2d/tools/tools.ts @@ -1,4 +1,4 @@ -import type { Live2dConfig } from "../../context/config-context"; +import type { Live2dConfig } from '../../context/config-context'; export abstract class Tool { private _config: Live2dConfig; diff --git a/packages/live2d/src/styles/unocss.global.css.d.ts b/packages/live2d/src/styles/unocss.global.css.d.ts index 46fd886..43a2d29 100644 --- a/packages/live2d/src/styles/unocss.global.css.d.ts +++ b/packages/live2d/src/styles/unocss.global.css.d.ts @@ -1,2 +1,2 @@ -declare let style: string -export default style \ No newline at end of file +declare let style: string; +export default style; diff --git a/packages/live2d/src/utils/distinctArray.ts b/packages/live2d/src/utils/distinctArray.ts index 4edeb81..43ecf70 100644 --- a/packages/live2d/src/utils/distinctArray.ts +++ b/packages/live2d/src/utils/distinctArray.ts @@ -1,4 +1,4 @@ -import type { ObjectAny } from "../context/config-context"; +import type { ObjectAny } from '../context/config-context'; export const distinctArray = (arr: T[], key: keyof T) => { const map = new Map(); @@ -6,4 +6,4 @@ export const distinctArray = (arr: T[], key: keyof T) => { map.set(item[key], item); } return [...map.values()]; -} \ No newline at end of file +}; diff --git a/packages/live2d/src/utils/isNotEmpty.ts b/packages/live2d/src/utils/isNotEmpty.ts index 85d492f..84c4423 100644 --- a/packages/live2d/src/utils/isNotEmpty.ts +++ b/packages/live2d/src/utils/isNotEmpty.ts @@ -1,5 +1,13 @@ -export const isNotEmpty = (value: T[] | T | null | undefined): value is T[] | T => { - return value !== null && value !== undefined && (Array.isArray(value) ? value.length > 0 : - typeof value === 'string' ? value.trim() !== '' : true +export const isNotEmpty = ( + value: T[] | T | null | undefined, +): value is T[] | T => { + return ( + value !== null && + value !== undefined && + (Array.isArray(value) + ? value.length > 0 + : typeof value === 'string' + ? value.trim() !== '' + : true) ); -} \ No newline at end of file +}; diff --git a/packages/live2d/src/utils/isString.ts b/packages/live2d/src/utils/isString.ts index b6f7de8..1d39762 100644 --- a/packages/live2d/src/utils/isString.ts +++ b/packages/live2d/src/utils/isString.ts @@ -1,7 +1,7 @@ export const isString = (value: unknown): value is string => { - return typeof value === "string"; -} + return typeof value === 'string'; +}; export const isNotEmptyString = (value: unknown): value is string => { - return typeof value === "string" && value.length > 0; -}; \ No newline at end of file + return typeof value === 'string' && value.length > 0; +}; diff --git a/packages/live2d/src/utils/randomSelection.ts b/packages/live2d/src/utils/randomSelection.ts index 80d678b..76e5b84 100644 --- a/packages/live2d/src/utils/randomSelection.ts +++ b/packages/live2d/src/utils/randomSelection.ts @@ -6,4 +6,4 @@ export const randomSelection = (obj: T | T[]): T | undefined => { return obj[Math.floor(Math.random() * obj.length)]; } return obj; -}; \ No newline at end of file +}; diff --git a/packages/live2d/src/utils/unoMixin.ts b/packages/live2d/src/utils/unoMixin.ts index 1cbedf7..c4a0ac0 100644 --- a/packages/live2d/src/utils/unoMixin.ts +++ b/packages/live2d/src/utils/unoMixin.ts @@ -1,20 +1,20 @@ -import { adoptStyles, type LitElement, unsafeCSS } from 'lit' +import { type LitElement, adoptStyles, unsafeCSS } from 'lit'; // @ts-ignore -import style from "../styles/unocss.global.css?inline" +import style from '../styles/unocss.global.css?inline'; declare global { // biome-ignore lint/suspicious/noExplicitAny: any is needed to define a mixin export type LitMixin = new (...args: any[]) => T & LitElement; } -const stylesheet = unsafeCSS(style) +const stylesheet = unsafeCSS(style); export const UNO = (superClass: T): T => class extends superClass { connectedCallback() { super.connectedCallback(); if (this.shadowRoot) { - adoptStyles(this.shadowRoot, [stylesheet]) + adoptStyles(this.shadowRoot, [stylesheet]); } } - }; \ No newline at end of file + }; diff --git a/packages/live2d/src/utils/util.ts b/packages/live2d/src/utils/util.ts index 9fa44eb..19a17da 100644 --- a/packages/live2d/src/utils/util.ts +++ b/packages/live2d/src/utils/util.ts @@ -1,26 +1,26 @@ -export const hasWebsiteHome = location.hostname === "/"; +export const hasWebsiteHome = location.hostname === '/'; -export const documentTitle = document.title.split(" - ")[0]; +export const documentTitle = document.title.split(' - ')[0]; -export const isReferrer = document.referrer === ""; +export const isReferrer = document.referrer === ''; export const getReferrer = () => { if (isReferrer) { return; } return new URL(document.referrer); -} +}; export const getReferrerDomain = () => { const Domains: Record = { - baidu: "百度", - so: "360搜索", - google: "谷歌搜索", - bing: "必应", - yahoo: "雅虎", - sogou: "搜狗", - haosou: "好搜", - } + baidu: '百度', + so: '360搜索', + google: '谷歌搜索', + bing: '必应', + yahoo: '雅虎', + sogou: '搜狗', + haosou: '好搜', + }; const referrer = getReferrer(); if (!referrer) { return; @@ -29,9 +29,9 @@ export const getReferrerDomain = () => { if (location.hostname === hostname) { return; } - const domain = hostname.split(".")[1]; + const domain = hostname.split('.')[1]; if (Domains[domain]) { return Domains[domain]; } return hostname; -} \ No newline at end of file +}; diff --git a/packages/live2d/tsconfig.json b/packages/live2d/tsconfig.json index 188fc7e..8725c11 100644 --- a/packages/live2d/tsconfig.json +++ b/packages/live2d/tsconfig.json @@ -1,32 +1,32 @@ { - "compilerOptions": { - "lib": ["ES2020", "DOM", "DOM.Iterable"], - "jsx": "react-jsx", - "target": "ES2020", - "noEmit": true, - "skipLibCheck": true, + "compilerOptions": { + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "jsx": "react-jsx", + "target": "ES2020", + "noEmit": true, + "skipLibCheck": true, - /* modules */ - "module": "ESNext", - "moduleResolution": "bundler", - "allowImportingTsExtensions": true, - "resolveJsonModule": true, - "isolatedModules": true, + /* modules */ + "module": "ESNext", + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, - /* Linting */ - "strict": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noFallthroughCasesInSwitch": true, + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, - "experimentalDecorators": true, - "useDefineForClassFields": false, - "plugins": [ - { - "name": "ts-lit-plugin" - } - ] - }, - "include": ["src/**/*"], + "experimentalDecorators": true, + "useDefineForClassFields": false, + "plugins": [ + { + "name": "ts-lit-plugin" + } + ] + }, + "include": ["src/**/*"], "exclude": ["node_modules", "dist", "src/libs/**/*"] } diff --git a/packages/live2d/uno.config.ts b/packages/live2d/uno.config.ts index 89d51ec..9c4dedf 100644 --- a/packages/live2d/uno.config.ts +++ b/packages/live2d/uno.config.ts @@ -7,9 +7,12 @@ export default defineConfig({ presets: [presetUno()], transformers: [transformerDirectives()], rules: [ - ['writing-vertical-rl', { - "writing-mode": "vertical-rl" - }] + [ + 'writing-vertical-rl', + { + 'writing-mode': 'vertical-rl', + }, + ], ], theme: { backgroundColor: { @@ -19,14 +22,15 @@ export default defineConfig({ tips: 'rgba(224, 186, 140, .62)', }, boxShadow: { - tips: '0 3px 15px 2px rgba(191, 158, 118, .2)' + tips: '0 3px 15px 2px rgba(191, 158, 118, .2)', }, animation: { keyframes: { - shake: '{2%{transform:translate(.5px,-1.5px) rotate(-.5deg);}4%{transform:translate(.5px,1.5px) rotate(1.5deg);}6%{transform:translate(1.5px,1.5px) rotate(1.5deg);}8%{transform:translate(2.5px,1.5px) rotate(.5deg);}10%{transform:translate(.5px,2.5px) rotate(.5deg);}12%{transform:translate(1.5px,1.5px) rotate(.5deg);}14%{transform:translate(.5px,.5px) rotate(.5deg);}16%{transform:translate(-1.5px,-.5px) rotate(1.5deg);}18%{transform:translate(.5px,.5px) rotate(1.5deg);}20%{transform:translate(2.5px,2.5px) rotate(1.5deg);}22%{transform:translate(.5px,-1.5px) rotate(1.5deg);}24%{transform:translate(-1.5px,1.5px) rotate(-.5deg);}26%{transform:translate(1.5px,.5px) rotate(1.5deg);}28%{transform:translate(-.5px,-.5px) rotate(-.5deg);}30%{transform:translate(1.5px,-.5px) rotate(-.5deg);}32%{transform:translate(2.5px,-1.5px) rotate(1.5deg);}34%{transform:translate(2.5px,2.5px) rotate(-.5deg);}36%{transform:translate(.5px,-1.5px) rotate(.5deg);}38%{transform:translate(2.5px,-.5px) rotate(-.5deg);}40%{transform:translate(-.5px,2.5px) rotate(.5deg);}42%{transform:translate(-1.5px,2.5px) rotate(.5deg);}44%{transform:translate(-1.5px,1.5px) rotate(.5deg);}46%{transform:translate(1.5px,-.5px) rotate(-.5deg);}48%{transform:translate(2.5px,-.5px) rotate(.5deg);}50%{transform:translate(-1.5px,1.5px) rotate(.5deg);}52%{transform:translate(-.5px,1.5px) rotate(.5deg);}54%{transform:translate(-1.5px,1.5px) rotate(.5deg);}56%{transform:translate(.5px,2.5px) rotate(1.5deg);}58%{transform:translate(2.5px,2.5px) rotate(.5deg);}60%{transform:translate(2.5px,-1.5px) rotate(1.5deg);}62%{transform:translate(-1.5px,.5px) rotate(1.5deg);}64%{transform:translate(-1.5px,1.5px) rotate(1.5deg);}66%{transform:translate(.5px,2.5px) rotate(1.5deg);}68%{transform:translate(2.5px,-1.5px) rotate(1.5deg);}70%{transform:translate(2.5px,2.5px) rotate(.5deg);}72%{transform:translate(-.5px,-1.5px) rotate(1.5deg);}74%{transform:translate(-1.5px,2.5px) rotate(1.5deg);}76%{transform:translate(-1.5px,2.5px) rotate(1.5deg);}78%{transform:translate(-1.5px,2.5px) rotate(.5deg);}80%{transform:translate(-1.5px,.5px) rotate(-.5deg);}82%{transform:translate(-1.5px,.5px) rotate(-.5deg);}84%{transform:translate(-.5px,.5px) rotate(1.5deg);}86%{transform:translate(2.5px,1.5px) rotate(.5deg);}88%{transform:translate(-1.5px,.5px) rotate(1.5deg);}90%{transform:translate(-1.5px,-.5px) rotate(-.5deg);}92%{transform:translate(-1.5px,-1.5px) rotate(1.5deg);}94%{transform:translate(.5px,.5px) rotate(-.5deg);}96%{transform:translate(2.5px,-.5px) rotate(-.5deg);}98%{transform:translate(-1.5px,-1.5px) rotate(-.5deg);}0%,100%{transform:translate(0,0) rotate(0);}}' + shake: + '{2%{transform:translate(.5px,-1.5px) rotate(-.5deg);}4%{transform:translate(.5px,1.5px) rotate(1.5deg);}6%{transform:translate(1.5px,1.5px) rotate(1.5deg);}8%{transform:translate(2.5px,1.5px) rotate(.5deg);}10%{transform:translate(.5px,2.5px) rotate(.5deg);}12%{transform:translate(1.5px,1.5px) rotate(.5deg);}14%{transform:translate(.5px,.5px) rotate(.5deg);}16%{transform:translate(-1.5px,-.5px) rotate(1.5deg);}18%{transform:translate(.5px,.5px) rotate(1.5deg);}20%{transform:translate(2.5px,2.5px) rotate(1.5deg);}22%{transform:translate(.5px,-1.5px) rotate(1.5deg);}24%{transform:translate(-1.5px,1.5px) rotate(-.5deg);}26%{transform:translate(1.5px,.5px) rotate(1.5deg);}28%{transform:translate(-.5px,-.5px) rotate(-.5deg);}30%{transform:translate(1.5px,-.5px) rotate(-.5deg);}32%{transform:translate(2.5px,-1.5px) rotate(1.5deg);}34%{transform:translate(2.5px,2.5px) rotate(-.5deg);}36%{transform:translate(.5px,-1.5px) rotate(.5deg);}38%{transform:translate(2.5px,-.5px) rotate(-.5deg);}40%{transform:translate(-.5px,2.5px) rotate(.5deg);}42%{transform:translate(-1.5px,2.5px) rotate(.5deg);}44%{transform:translate(-1.5px,1.5px) rotate(.5deg);}46%{transform:translate(1.5px,-.5px) rotate(-.5deg);}48%{transform:translate(2.5px,-.5px) rotate(.5deg);}50%{transform:translate(-1.5px,1.5px) rotate(.5deg);}52%{transform:translate(-.5px,1.5px) rotate(.5deg);}54%{transform:translate(-1.5px,1.5px) rotate(.5deg);}56%{transform:translate(.5px,2.5px) rotate(1.5deg);}58%{transform:translate(2.5px,2.5px) rotate(.5deg);}60%{transform:translate(2.5px,-1.5px) rotate(1.5deg);}62%{transform:translate(-1.5px,.5px) rotate(1.5deg);}64%{transform:translate(-1.5px,1.5px) rotate(1.5deg);}66%{transform:translate(.5px,2.5px) rotate(1.5deg);}68%{transform:translate(2.5px,-1.5px) rotate(1.5deg);}70%{transform:translate(2.5px,2.5px) rotate(.5deg);}72%{transform:translate(-.5px,-1.5px) rotate(1.5deg);}74%{transform:translate(-1.5px,2.5px) rotate(1.5deg);}76%{transform:translate(-1.5px,2.5px) rotate(1.5deg);}78%{transform:translate(-1.5px,2.5px) rotate(.5deg);}80%{transform:translate(-1.5px,.5px) rotate(-.5deg);}82%{transform:translate(-1.5px,.5px) rotate(-.5deg);}84%{transform:translate(-.5px,.5px) rotate(1.5deg);}86%{transform:translate(2.5px,1.5px) rotate(.5deg);}88%{transform:translate(-1.5px,.5px) rotate(1.5deg);}90%{transform:translate(-1.5px,-.5px) rotate(-.5deg);}92%{transform:translate(-1.5px,-1.5px) rotate(1.5deg);}94%{transform:translate(.5px,.5px) rotate(-.5deg);}96%{transform:translate(2.5px,-.5px) rotate(-.5deg);}98%{transform:translate(-1.5px,-1.5px) rotate(-.5deg);}0%,100%{transform:translate(0,0) rotate(0);}}', }, durations: { - shake: "50s" + shake: '50s', }, timingFns: { shake: 'ease-in-out', @@ -34,6 +38,6 @@ export default defineConfig({ counts: { shake: 'infinite', }, - } - } -}); \ No newline at end of file + }, + }, +}); diff --git a/packages/live2d/vite.config.ts b/packages/live2d/vite.config.ts index 1f816ed..9a63b48 100644 --- a/packages/live2d/vite.config.ts +++ b/packages/live2d/vite.config.ts @@ -1,13 +1,13 @@ -import { defineConfig } from "vite"; -import { resolve } from "node:path"; -import react from "@vitejs/plugin-react"; +import { resolve } from 'node:path'; +import react from '@vitejs/plugin-react'; +import { defineConfig } from 'vite'; export default defineConfig({ plugins: [ react({ babel: { parserOpts: { - plugins: ["decorators-legacy"], + plugins: ['decorators-legacy'], }, }, }), @@ -15,18 +15,18 @@ export default defineConfig({ build: { lib: { - entry: resolve(__dirname, "src/index.ts"), - name: "Live2d", - fileName: "live2d", + entry: resolve(__dirname, 'src/index.ts'), + name: 'Live2d', + fileName: 'live2d', }, rollupOptions: { - external: ["react", "react-dom"], + external: ['react', 'react-dom'], }, }, server: { fs: { - strict: false - } - } + strict: false, + }, + }, });